This is my first time using TikZ. I can't figure out how to change the ordering of the nodes from bottom up starting from the bottom left corner?
Also, when I try to use package xcolor midnightblue doesn't work. Why is this? How can I get it to work?
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[darkstyle/.style={circle,draw,fill=midnightblue!25,minimum size=4}]
\foreach \x in {0,...,4}
\foreach \y in {0,...,4}
{\pgfmathtruncatemacro{\label}{\x - 5 * \y +21}
\node [darkstyle] (\x\y) at (1.5*\x,1.5*\y) {\label};}
\foreach \x in {0,...,4}
\foreach \y [count=\yi] in {0,...,3}
\draw (\x\y)--(\x\yi) (\y\x)--(\yi\x) ;
\end{tikzpicture}
\end{document}


y=-1cmto the TikZ picture’s option would be one way. Or simply using\node [darkstyle] (\x\y) at (1.5*\x,-1.5*\y) {\label};}(note the-). — For future MWEs, please see Why not use the minimal class. – Qrrbrbirlbel Apr 05 '13 at 06:40\x\y(Ex:00, ...,44), usea-\x-\y(ex:a-0-0, ...,a-4-4) to name your nodes. – Paul Gaborit Apr 05 '13 at 06:48minimalclass works quite good for simple TikZ pictures, it is not a class for minimal WEs. Simply usearticleor thestandaloneclass (which, setup correctly, can automatically produce.pngfiles). The [tag:standalone] class even has atikzoption which a) loads thetikzpackage automatically and b) crops the PDF so that you only have the picture. – Qrrbrbirlbel Apr 05 '13 at 06:50