TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

PGF 2.0 Manual says,

You can add a single + sign in front of a coordinate or two of them as in +(1cm,0cm) or ++(0cm,2cm). Such coordinates are interpreted differently: The first form means,"1cm upwards from the previous specified position" and the second means, "2cm to the right of the previous specified position, making this the new specified position."

They provide this as an example:

\clip (-0.1,-0.2) rectangle (1.1,0.75);
\draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
\draw (-1.5,0) -- (1.5,0);
\draw (0,-1.5) -- (0,1.5);
\draw (0,0) circle (1cm);
(0,0) -- (3mm,0mm) arc (0:30:3mm) -- cycle;
\draw[red,very thick] (30:1cm) -- +(0,-0.5);

Now, if I change +(0,-0.5) to ++(0,-0.5), all remains same! Shouldn't the later be 0.5 left to the previously specified coordinate, i.e., (30:1cm) ?

share|improve this question
up vote 11 down vote accepted

The difference will be clear if you make a new point relative to the last point. An example:

\draw (0,0) -- +(1,1) -- +(2,0);
\fill [red] (0,0) circle (3pt);
\draw (0,0) -- ++(1,1) -- +(2,0);
\fill [red] (0,0) circle (3pt);

In the first picture, the last coordinate is 2 cm to the right of the first coordinate, while in the second picture, the last coordinate is 2 cm to the right of the second coordinate, because, this is the "new specified position".

share|improve this answer
I see, thanks a lot. So '+' is used as an offset to the current position right? Like, go x and y steps from current specified position?? – user1553 Dec 23 '10 at 13:58

Perhaps a shorter example could suffice:

  \draw (0,0) -- +(2,0) -- ++(0,1) -- +(2,0);
  % the first line (-- +(2,0) ) draws a line to 2cm to the right, *relative* to
  % the point of origin (0,0) *without* updating where we are then situated in
  % the current path.
  % the second line (-- ++(0,1) ) on the other hand, *does* update the location
  % where we are situated on the current path.

The result resembles mirrored letter "Z"

share|improve this answer
+1 for mentioning relative – user1553 Dec 23 '10 at 14:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.