plane-r2.tex 637 B

12345678910111213141516171819202122232425262728
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{tikz}
  3. \usepackage{tikz-3dplot}
  4. \begin{document}
  5. \tdplotsetmaincoords{110}{50}
  6. \begin{tikzpicture}
  7. [tdplot_main_coords,
  8. cube/.style={very thick,black},
  9. grid/.style={very thin,gray},
  10. axis/.style={->,blue,thick}]
  11. %draw a grid in the x-y plane
  12. \foreach \x in {-0.5,0,...,2.5}
  13. \foreach \y in {-0.5,0,...,2.5}
  14. {
  15. \draw[grid] (\x,-0.5) -- (\x,2.5);
  16. \draw[grid] (-0.5,\y) -- (2.5,\y);
  17. }
  18. %draw the axes
  19. \draw[axis] (-1,0,0) -- (3,0,0) node[anchor=west]{$y$};
  20. \draw[axis] (0,-1,0) -- (0,3,0) node[anchor=west]{$x$};
  21. \end{tikzpicture}
  22. \end{document}