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

Multiplot: how to replot in multiplot without overlapping?

2,919 views
Skip to first unread message

JX

unread,
Aug 27, 2010, 2:55:10 PM8/27/10
to
Hi gnuplotters,

I'm in the middle of using gnuplot as a real-time plotting tool. The
single plot is working fine in Linux as it plots everytime a graph
without overlapping previous plots, meaning it always plots a new
graph.
However, in multiplot it always plots on top of previous plots. I
tried the "clear", but there's a slight gap, so when I do this in real-
time, it makes the plot blinking.

Any feedback would be greatly appreciated.

JX

Hans-Bernhard Bröker

unread,
Aug 27, 2010, 4:49:13 PM8/27/10
to
On 27.08.2010 20:55, JX wrote:
> However, in multiplot it always plots on top of previous plot.

Of course it does! That's exactly what multiplot is for.

So why are you using multiplot in the first place?

Karl

unread,
Aug 28, 2010, 7:38:07 AM8/28/10
to
you´ve got to

unset multiplot
set multiplot

when you´re through with all the multiplots you want to appear on
one page. How else would gnuplot know you want the next plot to
appear on an empty sheet? And of course, it will always blink then.

I´d recommend sending the output to a bitmap, and having some
external program display it.

On 27.08.2010 20:55, JX wrote:

JX

unread,
Aug 30, 2010, 11:44:18 AM8/30/10
to
On Aug 27, 4:49 pm, Hans-Bernhard Bröker <HBBroe...@t-online.de>
wrote:

I used Gnuplot as a real time plotting tool, which takes in data
retreived from serial port and plots it real-timely.
There are multiple channels data in the data from serial port, after I
parsed them, I wantted to display them as a multiplot in gnuplot.
If I have only one channel, there's no problem since it has nothing to
do with multiplot.

The temp solution seems to use multiple gnuplot instances to do this?

JX

unread,
Aug 30, 2010, 11:51:34 AM8/30/10
to
On Aug 28, 7:38 am, Karl <mail....@gmx.net> wrote:
> you´ve got to
>
> unset multiplot
> set multiplot
>
> when you´re through with all the multiplots you want to appear on
> one page. How else would gnuplot know you want the next plot to
> appear on an empty sheet? And of course, it will always blink then.
>
> I´d recommend sending the output to a bitmap, and having some
> external program display it.

However, in the plot, it automatically replots itself. In the
multiplot, it doesn't replot itself at the given location.
I was trying to look at the src, and figure out what function plot
calls, and to see if I can implement it in multiplot.

Thanks for the suggestion, but will you expect any delay in the
scenario which one program writes to a bitmap and another one reads it
and display it? Also, is timing critical in this case?

Karl

unread,
Aug 30, 2010, 6:16:54 PM8/30/10
to
>>
>> I悲 recommend sending the output to a bitmap, and having some

>> external program display it.
>
> However, in the plot, it automatically replots itself. In the
> multiplot, it doesn't replot itself at the given location.
> I was trying to look at the src, and figure out what function plot
> calls, and to see if I can implement it in multiplot.

Well, yes. The behaviour of "replot" is a bit awkward in multiplot
mode. There should probably be markers on the single plots, so you
can choose which one you want to replot. Don愒 know if this is on
any developers to-do-list. ;-)


>
> Thanks for the suggestion, but will you expect any delay in the
> scenario which one program writes to a bitmap and another one reads it
> and display it? Also, is timing critical in this case?

Heck, how fast do you want it? I mean, do you have your finger on
ctrl-C while watching your plot, ready to stop some machine from
breaking?
Just let your script create the bitmap, and let it start that
external viewer, which hopefully notices it愀 already running, and
just reloads the file displayed. Should be easy on unix.

Karl

unread,
Aug 30, 2010, 6:22:18 PM8/30/10
to

One idea could be to have some shell script "demultiplex" the
serial port data, e.g. write them to different files, and have
multiple instances of gnuplot plot them. Put enough "pause"s in your
scripts, or you might not be able to use your computer for anything
else. ;-) It might help against the "flicker" problem, too.

sfeam

unread,
Aug 30, 2010, 7:40:55 PM8/30/10
to
Karl wrote:

>>>
>>> I´d recommend sending the output to a bitmap, and having some


>>> external program display it.
>>
>> However, in the plot, it automatically replots itself. In the
>> multiplot, it doesn't replot itself at the given location.
>> I was trying to look at the src, and figure out what function plot
>> calls, and to see if I can implement it in multiplot.
>
> Well, yes. The behaviour of "replot" is a bit awkward in multiplot
> mode. There should probably be markers on the single plots, so you

> can choose which one you want to replot. Don´t know if this is on
> any developers to-do-list. ;-)

You can already blank and re-draw individual plots within a multiplot.
But you have to specify which part of the screen you want to
blank and refresh manually. The "set multiplot layout NxM" command
obviously doesn't know anything about this.

Ethan


>>
>> Thanks for the suggestion, but will you expect any delay in the
>> scenario which one program writes to a bitmap and another one reads it
>> and display it? Also, is timing critical in this case?
>
> Heck, how fast do you want it? I mean, do you have your finger on
> ctrl-C while watching your plot, ready to stop some machine from
> breaking?
> Just let your script create the bitmap, and let it start that

> external viewer, which hopefully notices it´s already running, and

0 new messages