Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 at 14:42

2 Answers 2

up vote 1 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 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 at 13:49

Your Answer

 
discard

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.