On 2015-08-28 09:58+0100 Phil Rosenberg wrote:

> Hi Alan
> I have just noticed there is a value PL_NOTSET. This is documented in
> plsdidev as a value to pass in when you do not wish to set a value. I
> wondered if this might be usefully used in plspage. It would be much
> better than passing in 0 or using zero to represent unset particularly
> for the location. Currently in plspage it is impossible to set the
> location (xoff, yoff) to (0,0) or to tell if the location is supposed
> to be zero or if it is just unset.
>
> Of course the upshot is that this is an API change that will probably
> break all the drivers and some user code. Also the value of PL_NOTSET
> of -42 is not ideal as it would be perfectly legal to have a position
> of -42. Something like MIN_PLINT would be better.

Hi Phil:

The current 0. for [xy]upi and 0 for [xy]length to signal those values
are unset should remain unchanged since those values are invalid for
upi and length.  However, I agree that using 0 to signal [xy]offset is
unset is far from ideal since that is not an invalid value and there
is a similar objection to using PL_NOTSET for this purpose.

> This is really just a mention, I'm not saying we should do it as the
> cost is pretty high. But something to think about.

The minimum possible PLINT is definitely an invalid offset value so
I think your idea to use MIN_PLINT to signal [xy]offset is unset is a good
one so long as you continue to use 0. for [xy]upi and 0 for [xy]length
to signal those values are unset.  Furthermore, I don't feel the cost
of this backwards incompatible API change is very high since my guess
is few users bother with getting/setting [xy]offset. So I think this
change is fine if accompanied by the necessary documentation changes
for plspage and plgpage, and an announcement in README.release
concerning this (minor) backwards-incompatible change in our API.

Thus, if nobody else objects, I suggest you search through our entire
source tree for mentions of [xy]offset, plgpage, and plspage, and make
this global MIN_PLINT change accordingly.

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
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to