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

I've many small pictures, each centered at (0,0) in their own figure but i need to combine them and in the combined picture the (0,0) of the 1st picture (in a scope) should be (4,2) of the 2nd picture - whats the best way to achieve this?

%Should point at the green dot - (3,2)X and (4,5) should be matched
% Should be at the other end of the red vector (3,2)X and (0,0)XX should be matched

The X after the coordinates are there to visualise, that these coordinates are (should be valid) in different scopes)

PS: Currently I'm doing it with xshift, yshift but that's kinda tedious.

share|improve this question
Welcome to TeX.SX! You can have a look on our our starter page to familiarize yourself further with our format. – Claudio Fiandrino Jul 12 '13 at 7:04
Can you include a simple example with two scopes starting from \documentclass{...} up to the \end{document}? – percusse Jul 12 '13 at 7:24
up vote 3 down vote accepted

Use named coordinates, such as:

\coordinate (x) at (4,5);
\coordinate (y) at (3,2);

Furthermore you could do relative positioning, and calculations, if desired.

If you would like to use such coordinates in several TikZ pictures, use the option remember picture.

For the part of moving the origin, it's a bit easier to shift the scope via a coordinate that using xshift, yshift, such as in


Though you need to know the difference to specify it.

share|improve this answer
But if i use some fragments in many different environments this wont work fine i think. I would like to stay away from fixed names for some coordinates for some pictures and make it as general as possible (in my opinion having several pictures centered around (0,0) and then i'ld only have to match the centerpoints of these pictures. – oerpli Jul 12 '13 at 7:56
@oerpli I hope, this information about naming and using fixed coordinates, which you can use in different scopes, helps in the original question. If you would have a follow-up question about moving a (0,0) point of one scope to match somehow another scope, possibly create another specific question (if you don't find an existing answer). – Stefan Kottwitz Jul 12 '13 at 8:01
I thought this question is about that. Maybe i haven't phrased it that well. – oerpli Jul 12 '13 at 8:05
@oerpli I added something for shifting the origin. – Stefan Kottwitz Jul 12 '13 at 8:30
@oerpli shift also accepts named coordinates, e.g., shift=(x) (no brace is needed since there is no comma inside the parentheses). – percusse Jul 12 '13 at 8:59

Your Answer


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

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