|
From: John D. <jb_...@bt...> - 2014-03-14 20:49:49
|
Hi
Further to my last posting, the "freeze" occurs when there is ANY interaction with the plotting window, e.g. a mouse click, a window overlap, or even the contents of a window below it changing, otherwise my code runs smoothly. Have I missed an initialisation option for the wingcc driver?
Kind regards
John
________________________________
From: John Duffy <jb_...@bt...>
To: "plp...@li..." <plp...@li...>
Sent: Friday, 14 March 2014, 20:21
Subject: wingcc Freeze
Hi
I have the following pseudo code which work well until it freezes...
plsdev("wingcc");
plspage(0, 0, 1600, 800, 0, 0);
plspause(0);
plinit();
for (...) {
plenv(); // set new x & y max and min parameters
plline(); // data to plot
}
plend();
Like I say, it works well until it freezes after a few hundred iterations of displaying data. I would appreciate any help in pointers where to look for problems, my code or within the "wingcc" driver. When the code freezes, Windows reports the plotting window as not responding.
Kind regards
John
________________________________
From: Alan W. Irwin <ir...@be...>
To: John Duffy <jb_...@bt...>
Cc: "plp...@li..." <plp...@li...>
Sent: Sunday, 2 February 2014, 18:47
Subject: Re: [Plplot-general] Updating Interactive Display with New Data
On 2014-02-02 13:54-0000 John Duffy wrote:
> Hi
>
> I would like to use PLplot to display experimental data as it is generated, i.e have the plot updated "live". I have tried a loop construct as per the pseudo code below, but I can only get the plot to update by clicking on mouse button 3. Any help/suggestions would be greatly appreciated.
>
>
> int main()
> {
> double x[n];
> double y[n];
>
> plsdev("xwin");
>
>
> plinit();
>
>
> for (;;) { // Wait for new data and update x & y arrays
>
>
plenv(...); // Set new x & y ranges
> plline(...); // Plot new data
>
> }
>
> plend();
>
> exit(0);
>
> }
I suggest you try the -np (no pause between pages) command-line option or
the equivalent plspause(0) call. We use the -np option a lot in
our interactive test targets for PLplot so that we don't have to
be clicking a lot when running those tests.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific
plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________ |