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

Filledcurves with functions?

298 views
Skip to first unread message

Ingo Thies

unread,
Jul 18, 2011, 3:25:42 AM7/18/11
to
Hi,

is there a way to use the filledcurves style with two functions (between
them the curve is to be filled) instead of data files? gnuplot.pdf
suggests that fill between two curves is only possible for two data
sets, but this would be a quite strong restriction, since single-curve
fill (i.e. between curve and axis) is possible even with functions.

Another possibility would be the use of "set table", but this would
require to write more than two data columns, and I cannot see how to do
this. Plotting multiple datasets results in multiple data blocks rather
than multiple y columns.

Therefore, the only way I can see now is to invoke an external program
or to manually edit the written table.

Any hints?

Ingo

Ingo Thies

unread,
Jul 18, 2011, 9:28:16 AM7/18/11
to
I wrote:

> Another possibility would be the use of "set table", but this would

OK, works well with parametric splot, but still dirty compared to a
direct fill between two functions. Since other scripts in the web are
using table & parametric for plotting filledcurve functions, this indeed
implies that there is currently no direct way.

Best wishes,

Ingo

sfeam

unread,
Jul 18, 2011, 12:53:01 PM7/18/11
to
Ingo Thies wrote:

> Hi,
>
> is there a way to use the filledcurves style with two functions (between
> them the curve is to be filled) instead of data files? gnuplot.pdf
> suggests that fill between two curves is only possible for two data
> sets, but this would be a quite strong restriction, since single-curve
> fill (i.e. between curve and axis) is possible even with functions.

set xrange [0:10]
plot '+' using 1:(sin($1)):(cos($1)) with filledcurves

See 'help special-filenames'

Ingo Thies

unread,
Jul 18, 2011, 5:27:13 PM7/18/11
to
Am 2011-07-18 18:53, schrieb sfeam:

> set xrange [0:10]
> plot '+' using 1:(sin($1)):(cos($1)) with filledcurves
>
> See 'help special-filenames'

A thanks, I've never been fully aware of these special filenames (and
others too, since the detour over parametric splot & table is being used
by several scripts shown in the web).

Best wishes,

Ingo

0 new messages