0

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.

rensemil
  • 167
  • 2
    like this ? \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:18
  • 1
    you should look for pgfplots, the package based on tikz and 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:26
  • Thank you; the code you provided helped! – rensemil Jul 28 '19 at 15:53
  • Is there a way to put matkings (1,2,3,...) on the axes? – rensemil Jul 28 '19 at 16:00
  • @Zarko I am not trying to plot a graph or a funtion, but rather to illustrate the addition of complex numbers. – rensemil Jul 28 '19 at 16:15
  • Even this is simple to draw in pgfplots :-) – Zarko Jul 28 '19 at 16:24

0 Answers0