Rotate and align ticks in gnuplot

I want to rotate xtics 45 degrees. In other words, direction. The problem is that ticks will appear inside the chart area, I want to put them outside the chart. See Figure:

enter image description here

+9
gnuplot
source share
1 answer

You must adjust both the alignment (maybe right , center or left ) and offset ( x,y coordinates relative to the default tics) xtics .

Here is an example that demonstrates three different possibilities. offset must be manually adjusted to get the correct value:

 set xrange [0.5:3.5] set bmargin 5 set multiplot layout 1,3 set xtics ('first' 1, 'second' 2, 'third' 3) rotate by 45 right set title 'right aligned' plot x set xtics center offset 0,-1 set title 'centered' replot set xtics left offset 0,-2 set title 'left aligned' replot unset multiplot 

This gives (from 4.6.4):

enter image description here

+14
source share

All Articles