Search code examples
gnuplot

How to set the ylabel horizontal in gnuplot


how to set the ylabel horizontal in gnuplot, like this, right ylabel style I want. While I use

set ylabel "Episode Duration (seconds)"

and

set ylabel "Episode Duration (seconds)" rotate by 90

the picture I get are like this my plot


Solution

  • The angle for a horizontal label is 0°. This should work:

    set lmargin 15
    set ylabel "Episode\n Duration\n (seconds)" offset 2,1 rotate by 0
    plot sin(x)
    

    Note that I had to increase the left margin so that the ylabel fits on the picture. And I have shifted the label.

    enter image description here