Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

filledcurves

10 views
Skip to first unread message

John Campbell

unread,
Jul 17, 2004, 2:36:26 PM7/17/04
to
I am having trouble understanding how to use filledcurves. I have read the
help page, but I don't know how to get the following:

The normal curve, shaded under the curve, down to the x axis, for x < -.8.
But not shaded for x > -.8.

Can anybody help? Thanks.
John Campbell


Hans-Bernhard Broeker

unread,
Jul 17, 2004, 8:18:02 PM7/17/04
to
John Campbell <jcdo...@shaw.ca> wrote:
> I am having trouble understanding how to use filledcurves. I have read the
> help page, but I don't know how to get the following:

> The normal curve, shaded under the curve, down to the x axis, for x < -.8.
> But not shaded for x > -.8.

That may not be possible in any simple way. You'll have to plot a
reduced function 'with filledcurves' that is not defined for x < -0.8.
And it may not work very well --- there seem to be some bugs in that
area.


--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Giulio Bottazzi

unread,
Jul 19, 2004, 3:56:26 PM7/19/04
to
Do you mean something like that (here the "normal curve" is x^2
and I've replaced -.8 with-2, to show better what's going on):

plot x**2 w l lt 1, (x>-2 ? log(0) : x**2) w filledcurve x1

In gnuplot version 4.1 you can also fill the space between two curves,
but as fas as I understand, you have to pick three columns from a
datafile (doesn't work with function). Check the file
demo/fillbetween.dem.

G.

Ethan Merritt

unread,
Jul 19, 2004, 6:43:36 PM7/19/04
to
In article <20040719215323.4425...@libero.it>,

Giulio Bottazzi <giulio....@libero.it> wrote:
>
>In gnuplot version 4.1 you can also fill the space between two curves,
>but as fas as I understand, you have to pick three columns from a
>datafile (doesn't work with function).

That is correct, but you can nevertheless dummy up a plot that
uses both a data-generated curve and a function. Here is an example:

f(x) = <some model for your data>
plot 'data' using 1:2:(f($1)) with filledcurves above
--
Ethan A Merritt

0 new messages