Search code examples
plotgnuplotfigure

Gnuplot filled curves not showing properly


I am trying to plot a filled curve with Gnuplot. If I set the Y range to a large value, the filled curve is plotting just fine. However, when I use a small Y range, some part of the curve are not filling with colors.

set terminal postscript color size 3.25,3.25 font "Helvetica, 8"
set output "test.ps"
set key at screen 0.95,0.70 right bottom
set border lt 1 lc 0 lw 1
set lmargin at screen 0.25
set rmargin at screen 0.95
set tmargin at screen 0.675
set bmargin at screen 0.15
set xlabel "X"
set ylabel "Y"
set xr [-1:2]
set yr [0:160]
set format x "%2.1f"
set style fill transparent solid 0.4
plot "data" w filledcurve x1 lt 1 lw 0.1 lc rgb "red"

This figure is the one with large Y range which is just fine. enter image description here

This one is the figure with small Y range which is not plotting well. enter image description here

The data file is available here. https://drive.google.com/drive/folders/1OIHLT2Mz4QGX3VKeZCGM_S4VjTO0FuOc?usp=sharing

Any comment or solution would be appreciated. Thank you all!


Solution

  • No such problem in gnuplot version 5 (confirmed back to version 5.0 patchlevel 3). Output from current 5.2.4 shown. output from gnuplot 5.2.4