Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am making a map with gnuplot. But, I find that the length of X axis is not equal with the Y axis. For example, the length of X from 0 to 10 is 20 pixels while 15 pixels in Y axis from 1 to 10. Can I directly set X and Y axis same in length? Thanks.

share|improve this question
It seems you mean the unit length of both axes, not the overall length -- at least if I interpret your comment to @fede.evol's answer correct. Please clarify this also in your question. – mpy Feb 19 '14 at 14:42
up vote 4 down vote accepted

This sets the unit length of both axes to the same value:

set size ratio -1

Here is an excerpt from the documentation:

set size ratio <r> ...

The meaning of a negative value for <r> is different. If <r>=-1, gnuplot tries to set the scales so that the unit has the same length on both the x and y axes. This is equivalent to set view equal xy. See set view equal. If <r>=-2, the unit on y has twice the length of the unit on x, and so on.

share|improve this answer
Thanks, it works – HXGuo Feb 21 '14 at 6:01

Try with

set size square

This should set the dimension (not scale) of the two axis to be equal.

share|improve this answer
Thank you for your help. I set different range of X and Y axis with 'set xrange [-15:15]; set yrange [-20:20]'. In this case, I can not get the same length X Y axis with 'set size square'. – HXGuo Feb 19 '14 at 13:49

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.