Tick ​​hiding histogram

I draw a histogram in gnuplot and the bars end on ticks along the x axis, for example:

enter image description here

Is there any way to prevent this?

+4
source share
2 answers

I don’t know for sure whether this will work or not, but you can try the following:

  set grid noxtics noytics noztics front 

From reading the documentation, it looks like this will push ticks to the top of the stack of objects when plotting (i.e., they will be displayed after the bars make them visible (I think)). Another option is to use transparency in your fillstyle, but this may not work depending on your terminal (and this may not be desirable).

+4
source

You can add some lines to your script as

 plot 'data.dat' # whatever your plot command is set yrange [0:GPVAL_DATA_Y_MAX*1.05] replot 

This extends the y range slightly above the highest point of the data. To find out the highest y point you need to draw once, then draw again after setting the y range. Another option is to do

 set xtics out 

This causes the xtics to indicate instead.

+1
source

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


All Articles