plane-r2.tex 511 B

12345678910111213141516171819202122
  1. \tdplotsetmaincoords{110}{50}
  2. \begin{tikzpicture}
  3. [tdplot_main_coords,
  4. cube/.style={very thick,black},
  5. grid/.style={very thin,gray},
  6. axis/.style={->,blue,thick}]
  7. %draw a grid in the x-y plane
  8. \foreach \x in {-0.5,0,...,2.5}
  9. \foreach \y in {-0.5,0,...,2.5}
  10. {
  11. \draw[grid] (\x,-0.5) -- (\x,2.5);
  12. \draw[grid] (-0.5,\y) -- (2.5,\y);
  13. }
  14. %draw the axes
  15. \draw[axis] (-1,0,0) -- (3,0,0) node[anchor=west]{$y$};
  16. \draw[axis] (0,-1,0) -- (0,3,0) node[anchor=west]{$x$};
  17. \end{tikzpicture}