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
Of course it does! That's exactly what multiplot is for.
So why are you using multiplot in the first place?
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:
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?
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?
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.
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.
>>>
>>> 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