I want to draw a coordinate system like this:

enter image description here

I would like to specify the width and height of the coordinate system and where the origin begins (upper left corner). I also want to specify the x and y axes with arrows. Additionally the end of the x and y axis should be indicated with the text "200px".

I'm a LaTeX beginner and am not sure how to do that.

Can anyone recommend a latex package for it?

  • 4
    The first choices would be TikZ or PsTricks, associated with TikZ you also have pgfplots – Peter Jansson Feb 17 '13 at 14:09
  • 2
    You should look into the package pgf (also named tikz in its front-end layer) or pstricks. Both have amazing drawing capabilities and support just what you request. – zeroth Feb 17 '13 at 14:09

The TikZ package is great! I did the following:


    % TikZ picture with origin upper left
        % 4x4 grid
        \draw (0, 0) grid (4, 4);
        % origin point
        \draw [color=blue, fill=blue] (0, 0) circle (0.1);
        % x-axis
        \draw [thick,->] (0, 0) -- (4.5, 0);
        % y-axis
        \draw [thick,->] (0, 0) -- (0, 4.5);
        % origin label
        \node at (-0.1, -0.5) {(0, 0)};
        % x-axis label
        \node at (4.5, -0.5) {200px};
        % y-axis label
        \node at (0, 5) {200px};



enter image description here

Very helpful: A brief introduction into TikZ


Tikz or pstricks are more powerful but LaTeX has a built in coordinate drawing system, and you really don't need to load an external package for this (although I loaded color)

enter image description here



\put(4,0){\makebox(0,0)[cb]{\tiny x}}
\put(0,-4){\makebox(0,0)[cr]{\tiny y`}}


  • 3
    It's good that this has a non-TikZ answer, but I feel like this is a good example of why bloated packages like TikZ or PSTricks are useful even for rather simple tasks. Man, code for graphics with plain LaTeX is scary! – Jake Feb 17 '13 at 15:30
  • 1
    Thank you for this! It's good to know that the standard can do this. But I prefer the TikZ-way. :) – Benny Neugebauer Feb 17 '13 at 19:01

With PSTricks.


enter image description here

It is also possible to create non-orthogonal coordinate system with PSTricks as follows. Here, OI and OJ are the unit vectors that are parallel to x and y axes, respectively.



enter image description here

It might be unavailable in TikZ or others.


The syntax of \pstOIJGeonode is a bit uncommon as follows.


The first point A1 must come right after \pstOIJGeonode but the remaining points A2, ..., An must come right after {O}{I}{J}. I don't know why the author made such a strange syntax.

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.