Mobile app version of vmapp.org
Login or Join
Rambettina927

: Gnuplot: problems with filling Using Gnuplot, I tried to fill the surface between a discrete gaussian and the x-axis: the problem comes when the gaussian is cut from the bounds parallel to the

@Rambettina927

Posted in: #Fill #Gnuplot

Using Gnuplot, I tried to fill the surface between a discrete gaussian and the x-axis: the problem comes when the gaussian is cut from the bounds parallel to the y-axis.
This is the result:

The code (splitted in two files):

set terminal pngcairo
set xrange [0:1]
set yrange [0:1.2]


########
set border linewidth 1.5
# Axes
set style line 11 lc rgb '#808080' lt 1
set border 3 back ls 11
set tics nomirror out scale 0.75
# Grid
set style line 12 lc rgb'#808080' lt 0 lw 1
set grid back ls 12
########
#set style fill transparent solid 0.5 noborder
set style function filledcurves below x1=0
set clip two




plot '../results/free' u 1:t w filledcurves below lc rgb "forest-green" notitle


Any suggestion to avoid that?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Rambettina927

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann6370331

You don't give any source or tell us what you tried, but:


The filledcurves style is only relevant to 2-d plotting. Three
variants are possible. The first two variants require either a
function or two columns of input data, and may be further modified by
the options listed below. The first variant, closed, treats the curve
itself as a closed polygon. This is the default.

The second variant is to fill the area between the curve and a given
axis, a horizontal or vertical line, or a point.

gnuplot.sourceforge.net/docs_4.2/node245.html#5596
"Second variant" means option {above | below} (e.g. plot ... with filledcurves below)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme