On 2015-05-22 12:15+0100 Phil Rosenberg wrote: > Hi Alan > I have just quickly looked at this and I believe I made this change by design. > > The reason being that c_plinit calls plP_bop which calls plPsubpInit > which calls c_plschr before plsc->level is set to 1. Therefore a check > for initialisation level means that plP_state does not get called and > the state calls do not get placed in the buffer so it messes up > renders from the buffer. > > I can't offhand remember what the need is for other state parameters. > Do I remember correctly that colours can be set before plinit calls to > give a different background colour?
Yes, a lot of possibilities are available as command-line options (which are all run before plinit). Here are some from the result of the -h command-line option (where I have removed a number I don't think are relevant): PLplot options: -dev name Output device name -o name Output filename -px number Plots per page in x -py number Plots per page in y -geometry geom Window size/position specified as in X, e.g., 400x300, 400x300-100+200, +100-200, etc. -width width Sets pen width (0 <= width) -bg color Background color (FF0000=opaque red, 0000FF_0.1=blue with alpha of 0.1) -ncol0 n Number of colors to allocate in cmap 0 (upper bound) -ncol1 n Number of colors to allocate in cmap 1 (upper bound) -db Double buffer X window output -np No pause between pages -dpi dpi Resolution, in dots per inch (e.g. -dpi 360x360) -compression num Sets compression level in supporting devices -cmap0 file name Initializes color table 0 from a cmap0.pal format file in one of standard PLplot paths. -cmap1 file name Initializes color table 1 from a cmap1.pal format file in one of standard PLplot paths. -drvopt option[=value][,option[=value]]* Driver specific options -mfo PLplot metafile name Write the plot to the specified PLplot metafile -mfi PLplot metafile name Read the specified PLplot metafile I am sure you had good reasons for needing to insert the extra plP_state calls, but from one test where I change character size before running plinit, they definitely segfaulted when level is 0. So although it is not the same test, if you remove the level protection, I am pretty sure you will get a segfault (at least on Linux which is more sensitive to memory management errors than Windows) using, e.g., -bg 0000FF_0.1. Anyhow, this whole subject area is really beyond my understanding of the PLplot code so I am going to leave it to you to figure out how to avoid the segfaults while still satisfying the need not to mess up renders from the buffer. 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 __________________________ ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel