I wish to draw a coordinate system in LaTeX (using tikz) and I have not been able to find a good instruction. I know how to draw basic graphics, but surely there must be a better way, than to draw the axes manually?
My goal is to have a coordinate system with grid lines and markings on the axes.
Asked
Active
Viewed 130 times
0
rensemil
- 167
\documentclass[tikz,border=5mm]{standalone} \begin{document} \begin{tikzpicture} \draw[gray!50] (-1,-1) grid (4,4); \draw[->] (-1,0)--(4,0) node[below left]{$x$}; \draw[->] (0,-1)--(0,4) node[below left]{$y$}; \draw[blue,thick,-stealth] (0,0)--(1,0) node[midway,below]{$\vec{i}$}; \draw[red,thick,-stealth] (0,0)--(0,1) node[midway,left]{$\vec{j}$}; \end{tikzpicture} \end{document}– Black Mild Jul 28 '19 at 13:18pgfplots, the package based ontikzand dedicated for drawing 2-D and 3-D diagrams with many options for drawing axis grids, labeling them etc. – Zarko Jul 28 '19 at 13:26pgfplots:-) – Zarko Jul 28 '19 at 16:24