0

The x- and y-axis in my plot have the same size (set xrange [0,10], set yrange [0,10]). but When I plot it, Gnuplot shows it in a rectangle box. the x-axis stretches, although it has the same range. (If you plot a function like f(x)=x in gnuplot, you will understand me.)

What should I do to have it in a square shape?

This is a sample of my code to make eps from gnuplot:

set terminal postscript eps color enhanced "Times Roman" 30
set output 'pic22.eps'
set encoding iso_8859_1
set size 1.0,1.0
set border 31 lt -1 lw 2.0
set pointsize 1.5
set ytics 0.5
set xtics 0.5
set mytics 2
set xrange [0:1]
set yrange [0:1]
set xlabel "~{/Symbol a}"
set ylabel "~{/Symbol b}" 
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set key box opaque
set label "HD" at 0.6,0.3 textcolor "black" font "Times Roman,30"
set label "LD" at 0.3,0.6 textcolor "black" font "Times Roman,30"
set label "MC" at 0.6,0.6 textcolor "black" font "Times Roman,30"
set arrow from 0.5,0.5 to 0.5,1.0 nohead lw 2
set key off
f(x)=x
g(x)=0.5
pl (x>-1 && x<0.507 ? f(x):1/0) w l lw 3 lc 7 lt 1, (x>0.5 && x<1.1 ? g(x):1/0) w l lw 3 lc 7 lt 1
Reihaneh Kouhi
  • 489
  • 1
  • 7
  • 23
  • 1
    On the screen, you just resize the window. If you output to any graphics device, you have options to set the resulting graph size, including aspect ratio. Give us code and OS, then we can be more concrete. – vaettchen Jun 11 '18 at 05:42
  • I add a sample. I make eps file by Gnuplot using that sample. As you will see, the ranges are the same for x and y, but the result is more in rectangle shape not square. – Reihaneh Kouhi Jun 11 '18 at 14:24
  • 2
    You probably want `set size square` or, equivalently, `set size ratio 1`. Take a look at the output of `help size` -- gnuplot has quite powerful ways to control figure size and aspect ratio. – user8153 Jun 11 '18 at 16:53
  • https://stackoverflow.com/a/27546936/2604213 – Christoph Jun 11 '18 at 17:40
  • good. solved. thanks – Reihaneh Kouhi Jun 11 '18 at 18:22

0 Answers0