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 have some old pstricks code which I'm re-doing with TikZ. In my current picture, the x and y scales are different:


However, this has the problem that circles are drawn as ellipses, being stretched more in the y direction. I've also tried


but this has the same effect of stretching circles into ellipses.

So is there any way of scaling coordinates only in TikZ, which doesn't affect the object shapes?

share|improve this question
Hi Alasdair. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. – Claudio Fiandrino Apr 12 '13 at 13:57
PSTricks' circle uses \psrunit (radial unit). – kiss my armpit Apr 12 '13 at 14:08
Related (pgfplots changes the internal x/y coordinate system too): How to draw on axis from pgfplots? – Qrrbrbirlbel Apr 12 '13 at 16:55

I have discovered the solution as follows

\draw (1,1) circle(0.1cm);

does the job. I had been using

\draw (1,1) circle(0.1);

which picks up the individual scalings.

share|improve this answer
There is no difference with my answer then. :-) – kiss my armpit Apr 12 '13 at 14:28
This is because TikZ (and PGF) handle dimensions differently from dimensionless expressions. Dimensionless expressions are multipliers for the current x and y vectors (as relevant) whereas dimensions are taken to mean what they say. So radius=0.1cm means just that, whereas radius=0.1 means "set the x radius to 0.1 times the x vector and the y radius to 0.1 times the y vector". – Loop Space Apr 12 '13 at 14:38
Attaching a metric unit in expressions should be avoided except for line width that we seldom change when scaling. Global scaling becomes cumbersome if we attach the metric unit for every length. For example (2,2) circle (1) is much better than (2cm,2cm) circle (1cm), but \draw[line width=2pt] is acceptable in most case. – kiss my armpit Apr 12 '13 at 15:40

PSTricks uses \psrunit when drawing \pscircle.

enter image description here




    \draw[fill=red] (0,0) circle (\Radius{2});
    \draw (-2,-2) rectangle (2,2);

Note: declaring the radial unit globally gives you an advantage where you can change all the unit of circle radii in one place.

We can also declare a new key so that we can access this radial unit easier.


    r=+1cm, % setting a default value
    r radius/.style={radius={(#1)*\tikz@runit}},
    xr radius/.style={x radius={(#1)*\tikz@runit}},
    yr radius/.style={y radius={(#1)*\tikz@runit}}

    \fill[fill=red] (0,0) circle [r radius=1+1];
    \fill[fill=green] (-1,1) circle [xr radius=1+3/4, yr radius=1-1/3]
                      (1,1)  circle [xr radius=1+3/4, yr radius=1-1/3];
    \draw (-2,-2) rectangle (2,2);

enter image description here

share|improve this answer
Please think carefully before down voting. – kiss my armpit Apr 12 '13 at 15:22
@Jake: Please don't delete comments. Downvote cancelled but nothing changes. – kiss my armpit Apr 12 '13 at 15:30
@qrrbrbirlbel: Thanks for adding the face. – kiss my armpit Apr 12 '13 at 16:48
I have added a more TikZ-ish way to extend this approach to be a little bit more flexible. Feel free to revert, if this is not in the spirit of your answer. (One could also hack the () syntax of the circle and ellipse path operator but this syntax is considered “old” anyway.) – Qrrbrbirlbel Apr 12 '13 at 16:49
Karl's students: that's a very understandable and clear explanation. Upvoted. – Alasdair Apr 12 '13 at 22:53

The key idea of all the proposed solutions rely on changing the unitswith x= and y=. This works well.

However in my code it is highly desirable to stick with xscale= and yscale=. Therefore I have set up a very simple macro :

\fill[color=#1,shift only] (0,0) circle(#3);

which is used with :


to place a circular red point of 1.5pt radius at location (3,4).

share|improve this answer

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.