Search code examples
gnuplot

Gnuplot: draw error bars of data points outside plotting range


If I set a specific yrange and plot in a pdf terminal with this plot command:

plot "data.dat" u 1:4:5:6 w yerrorbars pt 6 ps 0.5 t "R_t"

errorbars that belong to data points outside the yrange, but end inside the yrange are not shown. How do I force gnuplot to draw those. I already tried "set clip one/two"


Solution

  • The only workaround I found is to plot the data 3 times, once for the central point and once for each side of the error bar. Use "-" as symbol for the errorbars and use their own "errorbars" to draw a line to the central point.