Gnuplot: trailing blank space

I have a multiplier like this:

Plot sample

How to remove remaining space added by xtics interval? Relevant configurations include:

 set xtics 10 set mxtics 5 

Data for xaxis approaches values ​​between 135 and 140.

Thanks.

+4
source share
2 answers

You should set your xrange explicitly if the data does not end with some nice round value. One way to do this is to use the stats command (gnuplot 4.6.0) and up:

 stats 'data.dat' set xrange[STATS_min_x:STATS_max_x] 

Otherwise, you can set xrange manually (if you know the value) or use the old-fashioned method:

 set output '/dev/null' plot 'data.dat' set xrange[GPVAL_DATA_X_MIN:GPVAL_DATA_X_MAX] set output'actual_output.png' replot 
+2
source

To disable auto-scaling of the x-axis to the next tic, use

 set autoscale xfix 

General syntax

 set autoscale {<axes>{|min|max|fixmin|fixmax|fix} | fix | keepfix} 
+1
source

Source: https://habr.com/ru/post/1492976/


All Articles