On Tue, Sep 28, 2010 at 6:46 PM, Alan W. Irwin
<ir...@beluga.phys.uvic.ca> wrote:
> On 2010-09-28 14:30-0700 Alan W. Irwin wrote:
>
>> For the "simplest is best" reasons [...], I am going to drop cmap1
>> from pllegend.  I will try to finish that by late this afternoon.
>
> Done as of revision 11231.
>

While working on the OCaml interface to pllegend, I came up with a
potential improvement to the C interface:

What do you think of changing the pllegend API somewhat to allow only
specifying the entries which are actually used?  For example, if there
are no symbols, the symbol arrays would be empty.  If there are two
lines and one box, there would be two elements in the line arrays and
one in the box array.  nlegend would still be the total number of
entries in the legend, and opt_array would be used to specify where
the legend entries are placed.

Here is a example subset of parameters:

nlegend: 4
opt_array: PL_LEGEND_LINE, PL_LEGEND_LINE, PL_LEGEND_SYMBOL |
PL_LEGEND_LINE, PL_LEGEND_LINE
line_colors: red, blue, purple, green
symbol_colors: blue, yellow

From these (plus styles, widths, symbols, etc), the legend would show up as:

1. blue symbols, red line
2. blue line
3. yellow symbols, purple line
4. green line

Does this make sense?  I think it would make passing arguments to
pllegend a bit more predictable as no dummy entries are required, but
I don't know if others would feel the same way.

I'm willing to make an attempt at implementation if you think it is
worth considering.

Hez

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to