I want to draw a coordinate system and/or Grid lines like this: enter image description here

I'm a LaTeX beginner and am not sure how I can use as a package to draw it.

Can anyone recommend a latex package for it?


You can utilize Tikz to achieve the image you've posted. See the result below

enter image description here

The code for the preceding output is




        dot/.style={circle,draw=black, fill,inner sep=1pt}, 

\draw[step=1cm,gray,dashed] (-1,-1) grid (7,7);

\foreach \x in {0,...,6}{
    \foreach \y in {0,...,6} {
        \node[dot] at (\x,\y){ };
\draw[line,green] (0,2) -- node[above,xshift=-2mm]{$u_2$}(1,4);
\draw[line,green] (0,2) -- node[above,xshift=-1mm]{$u_1$}(3,4);
\draw[line,red] (3,1) -- node[left]{$v_2$}(3,2);
\draw[line,red] (3,1) -- node[below]{$v_1$}(4,1);

  • (+1) One detail: ->,-latex is a bit more than necessary, just -latex is enough. You could also say ->,>=latex, where the first part says to add an arrow tip, while the second says set default arrow tip to latex. Nov 14 '16 at 20:53
  • @TorbjørnT., nice catch. I will update it.
    – CroCo
    Nov 14 '16 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.