Re: New warning about inline data and multiplots

Ethan A Merritt <[email protected]> Thu, 04 Dec 2025 14:58:19 -0800
Newsgroups gmane.comp.graphics.gnuplot.devel
Organization University of Washington
Message-ID <3483551.aeNJFYEL58@lioncub>
On Thursday, 4 December 2025 00:12:07 PST Dima Kogan wrote:

> Thanks for the notes!
> 
> I'll try to make this change when I get the time. What would work better
> if I use the datablock? 

Well, multiplot would work :-)
Seiously, your script works fine either with input from '-' or from
a datablock so long as it isn't inside a multiplot.

> Does that work with older gnuplot also?

It works in version 5.   (5.0 5.2 5.4)

> > The output script, as attached, was also incorrect in that it did not
> > contain an "unset multiplot" command.
> 
> OK. It was never clear to me if that was required, and what, if
> anything, was broken by omitting it.

The multiplot is not fully defined until the "unset multiplot" is reached.

One major thing is that most multiplots change the plot boundaries and
screen layout.  The original boundaries are restored by "unset multiplot".

Another is that in version 6, when the program sees a  "set multiplot"
command it begins saving commands into a datablock of strings named
$GPVAL_LAST_MULTIPLOT.  It continues saving commands into that block
until the "unset multiplot" command is reached.  That allows the entire
multiplot to be reproduced by replaying the saved commands.
That in turn allows "replot" to work, and to some extent mousing/zoom/pan,
none of which was possible at all prior to version 6.  This is the change that
rules out supporting use of plot '-' inside a multiplot, since the data cannot
be parsed or executed as valid gnuplot commands.

[aside] According to the documentation another concern is that some
terminals do not produce any visible output until the "unset" command.
I don't think that is true for any current terminals, so that particular
warning may be out of date. 

> 
> > For that matter, I don't think the script should be using multiplot at
> > all. Why is it using multiplot? There was nothing in the input you
> > showed that requested multiplot.
> 
> I cut down the demo script, which ended up removing the actual
> "multiplot" part of this. The full script and plot are on the gnuplotlib
> demo page (towards the end):

Ah. And there is the polar mode plot you filed a bug report for.

- Ethan




_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta