Search code examples
gnuplot

gnuplot: I need to plot on x-axis only 2 values


I use a gnuplot script to make a graph where I have values on x-axis.

 #SETUP X AXIS
 set xlabel 'STATION' offset 0,-1.5
 set xtics out 1001,44 rotate by 90  offset 0,-3
 set xrange [min:max]

The above works OK with files with ranges of data between "min" and "max" but this time I have a special case with only two values: I want on x-axis only value1 (min) and value2 (max), nothing before, after and in-between.

How can I do that?

I've tried to comment out

 #set xtics out 1001,44 rotate by 90  offset 0,-3

But I still get values between min and max on x-axis.


Solution

  • Ethan suggestion works

    set xtics (value1, value2)
    

    Thank you!