From: Thomas M. <t.r...@wa...> - 2014-05-01 16:34:21
|
Thanks for your message Alan. I could run "make xwin" but the subsequent commands failed for some reason. Note however that I am able to run the Python version of plplot successfully already. I am not sure that what you describe is quite it. Does the example program exit before you exit the plot? (so that you could e.g type "ls" in the terminal from which you ran the example program, etc.) My guess is no. The equivalent in PGPLOT is the /xwindow device where it asks you to "hit <cr> for the next page:" and once you do this, the plot disappears and program execution continues (exiting if there is nothing left to do). The /xserve device does not produce the "hit <cr>" message but the program continues executing and the plot persists. The equivalent with plplot would be that the plot appears, the program exits but the plot still exists. As I understand /xserve, an independent server is created which carries on running even after the program that created it has exited. This for example allows you to run another script and write a new plot into the plot window, or if you want open and write to a new window (by specifying "2/xserve", "3/xserve" etc). Here is the minimal Python example of where it differs relative to PGPLOT's /xserve: plsdev("xwin") plinit() plspause(False) plend() [rest of code] This continues executing rest code, but no plot is produced. If I do instead: plsdev("xwin") plinit() plend() a plot is produced, but has to explicitly exited before program execution resumes. tom On 1 May 2014 16:49, Alan W. Irwin <ir...@be...> wrote: > On 2014-05-01 09:49+0100 Thomas Marsh wrote: > > > [...]What I want to do is not quite > > as you summarise; sorry for not being clear. Its not so much that I want > to > > resume plotting -- I imagine plflush would be good for this -- but I want > > the plot to finish but then to persist and not simply disappear. I > > sometimes have multiple such plots in windows on my screen, potentially > > produced by independent scripts. When I am done with them I can click the > > "X" at the top-right to get rid of them. I have not managed to replicate > > this way of working with plplot. > [...] > > Hi Tom: > > I have been following your conversation with Arjen with interest, and > I think what you describe above is exactly what we provide. But I > might be interpreting what you said above incorrectly so let me make > clear what we provide with an exact example. > > In the build tree, if I build the xwin device and one of the simplest > examples with the following commands: > > # Create xwin device and all its dependencies > make xwin > # Create a particular C example and all its dependencies > make x00c > > then when I run > > examples/c/x00c -dev xwin > > the plot persists on the screen and the C example does not quit. In > fact, I can resize that plot so it does remain active until I exit > from it (by hitting the enter key or clicking on the button to destroy > the X window). So it appears to me this default behaviour of the xwin > device is exactly what you described above. > > You expressed and interest in Python so here is the equivalent there > > # Create xwin device and all its dependencies > make xwin > # Create Python binding for PLplot > make _plplotcmodule_fixed > # Populate build tree with python examples > make python_examples > > Then run > > examples/python/x00 -dev xwin > > and that plot has the same desired characteristics as the C version above. > > Will you try either the C version or Python version of the concrete example > above, and let us know what (if anything) the difficulty might be? > > 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 > __________________________ > |