TikZ gives us the ease of using relative coordinates, like in the following example.

    \coordinate (A) at (-1,0);
    \draw[blue,->] (A) -- +(30:1);
    \draw[red] ($(A)+(30:1)$) +(30+90:1) -- +(30-90:1) -- +(30:0.5) -- +(30+90:1) coordinate (end);
    \draw[green] (A) -- (end) ++(30-90:2) -- (A);


This is extremely elegant, as I do not have to computed the coordinates by hand, especially when using arbitrarily placed nodes.

As PSTricks makes use of the computational power of Postscript, I hope there is a way to use relative coordinates. The syntax might not be as easy as in TikZ, but using 3D and plotting is much easier with PSTricks.

Question: Does PSTricks have capabilities for relative coordinates? (If yes, how do I use them?)

  • 1
    give another example, because the above is a simple \psline(1,0)
    – user2478
    Commented May 31, 2013 at 18:59
  • I adjusted my post. Of course \psline(1,0) would have worked in that case, but needs the explicit coordinate (1,0). Commented May 31, 2013 at 19:04
  • What do you think about my answer, are you satisfied with it? If no, please explain what kind of answer you are seeking. Commented Jun 9, 2013 at 13:49
  • I added more excessive examples. My question is about all the mechanisms, that exist for handling relative coordinates in PSTricks. Commented Jun 9, 2013 at 17:25

2 Answers 2


\psrline is explained in pst-node documentation on page 41 but its code is implemented in pstricks-add. As usual, there might be a historical reason for this.

Based on your first case (before editing):

\psrline(A)(B)(C)... is equivalent to \draw (A) -- ++(B) -- ++(C)....


enter image description here

Based on your second case (after editing):

As far as I know, there is no PSTricks equivalent for \draw (A) -- +(B) -- +(C).... The following code produces the same output as yours.


    \pnode([nodesep=1,angle={!30 90 add}]B){end}
    \psline[linecolor=red](B)(end)([nodesep=1,angle={!30 90 sub}]B)([nodesep=0.5,angle=30]B)(end)
    \psline[linecolor=green]([nodesep=2,angle={!30 90 sub}]end)(A)

enter image description here

  • Thank you very much for adjusting your answer. Now it covers a broader range. Commented Jun 9, 2013 at 19:26
  • 1
    I will make use of all the things explained in your answer to typeset the graphics for lecture notes. Hopefully, I encounter new practices and can extend this answer with more examples. Commented Jun 9, 2013 at 20:04



enter image description here

another possibility for a single line segment is \rput(-1,0){\psline(1;30)}

  • \psrline is explained in pst-node documentation but its code is defined in pstricks-add. Do you know it? Commented Jun 7, 2013 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .