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.
2 Answers
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 toset 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.
Try with
set size square
This should set the dimension (not scale) of the two axis to be equal.
-
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'.– HXGuoFeb 19, 2014 at 13:49