On 24 July 2018 at 20:19, Alan W. Irwin <alan.w.irwin1...@gmail.com> wrote:
> On 2018-07-24 13:35-0000 Arjen Markus wrote:
>
>> Hi Phil,
>>
>>> -----Original Message-----
>>> From: Phil Rosenberg [mailto:p.d.rosenb...@gmail.com]
>>>
>>> I feel that if someone provides colours in rgb values we really should
>>> interpolate in
>>> rgb values. Or at the very least we need to make it very clear in the
>>> documentation
>>> that we always interpolate in hls space even if colours are provided as
>>> rgb.
>>>
>>> Any thoughts?
>>>
>> I agree: if you specify the colours in RGB, then you are not interested in
>> the HLS colour space. Indeed it would be very awkward to select the RGB
>> coordinates in such a way that you get intermediate RGB colours, when the
>> interpolation is actually done in HLS.
>>
>> Maybe there are good reasons to do it like this, but then I sure would
>> like to hear them. I tend to think that it is simply an oversight.
>
>
> To Phil and Arjen:
>
> I agree as well.  The documentation at
> <http://plplot.org/docbook-manual/plplot-html-5.13.0/color.html#color-map-1>
> clearly implies that if you choose RGB, the interpolation is in that
> space, and the documentation of plscmap1la and plscmap1l implies the
> same.  However, one concern I have about the current documentation, is
> the documentation of the plscmap1la and plscmap1l alt_hue_path
> argument.  That argument makes a lot of sense in HLS space, but does
> it make any sense at all if you are doing all interpolation in RGB
> space?  That is, should that argument be completely ignored if you are
> using RGB space interpolation?

If I remember correctly, the point of alt_hue_path is specifically to
determine the direction around the colour wheel for interpolation once
the rgb values have been converted to hls. When supplying colours in
hls space, you can specify the direction by using hue values outside
the range of 0-360, for example specifying the two hues 0 and 240
would go from red to blue via yellow, green and cyan, whereas
specifying the two hues 0 and -120 would go from red to blue via
magenta. However if you specify rgb colours [1,0,0] and [0,0,1] then
you can use the alt_hue_path to tell plplot to interpolat backwards
round the colour wheel.

I think it is actually a side effect that it also reverses the
direction when using hls space.

So moving to rgb interpolation for rgb values makes this variable
defunct really. I guess the best thing is to simply state this in the
documentation? Can we deprecate it somehow and in a future release
remove it altogether?

I have made the code changes and am about to test them. I will then
make the documentation changes and commit the results today.


>
> Anyhow, if the code currently does not follow the documentation
> (subject to any small documentation changes relevant to the above
> concern), then I think it is an oversight, and my thanks to Phil for
> being willing to sort this all out.
>
> Alan
> __________________________
> Alan W. Irwin
>
> 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
> __________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to