I would like to add support for loading segmented colors scales with
plspal1, using plscmap1a rather than plscmap1la.  This way, the colors
would be separated by distinct cut-offs rather than continuous
transitions.  See the color bar used by the US National Weather
Service radar images as an example:

http://radar.weather.gov/ridge/radar.php?rid=lsx&product=N0R&overlay=11101111&loop=no

This is a fairly straightforward change, and I have prepared it
locally.  However, two approaches seem reasonable to me and I would
like to as for others' opinions before settling on one.

The first, and the one I have implemented, is a new file format.
Rather than a "v2" header, this one has a "v2s" header (s =
segmented).  No reverse field is needed, as it is not applicable here.
 This format is otherwise the same as the existing v2 format.

The second option I thought of after implementing the v2s file format
code is to change the plspal1 API to take a second argument to
determine if the file should be interpreted as discrete values or
interpolation points.  Something similar to "plspal1(filename, true)"
for an interpolated color map and "plspal1(filename, false)" for a
segmented color map.

I like the second option more because the same color palette files can
potentially be used for multiple purposes.  It does, however, require
a small API change to plspal1 (adding a PLBOOL parameter) which would
then have to be propagated to all the language bindings.

Any thoughts?  I understand that this is rather poor timing, given the
number of "added plspaln to language X bindings" Subversion commits
there have been recently.  This has unfortunately been my first chance
to dig in to this section of code and see how it works.

Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to