8

In the TikZ manual I read that the default coordinate system's spacing is 1cm, so that (1,1) would be a vector going 1cm in x-direction and 1cm in y. In a diagram with a lot of nodes, that I am placing using the options such as above =of ..., this spacing is too much.

In order to change that, how can I change the coordinate system's default spacing?

3
  • I have deleted my answer since I totally misread your question. Sorry for that.
    – percusse
    Oct 9 '11 at 10:50
  • 1
    Not a problem. Can you explain why you misunderstood my question? That could help me formulating better questions in the future.
    – Ingo
    Oct 9 '11 at 12:45
  • Actually it is a mistake on my side. I think you have formulated your question in a good way. It is the last sentence that made me think that you are looking for a change in the unit length of the axis which is the first part of Torbjorn's answer.
    – percusse
    Oct 9 '11 at 19:35
12

You can change the coordinate system with x=<length> and y=<length> as options to a tikzpicture, e.g.

\begin{tikzpicture}[x=0.5cm,y=0.5cm]

however in your case you would probably rather change the node distance, as this defines the distance between nodes when using the above=of syntax:

\begin{tikzpicture}[node distance=0.5cm]

or

\begin{tikzpicture}[node distance=0.5cm and 0.5cm]

The difference between these two cases is illustrated in the TikZ/PGF manual (§16.5.3 Advanced Placement Options, pages 187-188, for v. 2.10).

You could also set this globally, by using \tikzset, i.e. add

\tikzset{node distance=0.5cm and 0.5cm}

to your preamble.

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.