On Fri, Sep 10, 2010 at 6:01 PM, Hezekiah M. Carty <hezekiahca...@users.sourceforge.net> wrote: > On Thu, Sep 9, 2010 at 3:00 PM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> > wrote: >> Hez, from your OCaml experience with legends would you be willing to >> implement a legend-drawing capability in libplplot and also modify one >> of our C examples to use that new API? (I assume from here on that >> that new function would be called pllegend.) If you were willing to do >> that implementation, I (and presumably others from past history) would >> be willing to help out afterward with the usual API addition tasks of >> pllegend documentation and propagating the pllegend API and its use in >> a standard example to all our languages. I believe the ultimate >> result of a well-documented and uniform pllegend capability for all >> our languages would be a welcome improvement to PLplot. >> > > I'll give it a shot. The current OCaml version is purely for > line-plot legends. It should be fairly straightforward to generalize > the function to allow either line or point/symbol legends from the > same function. > > I've started a src/pllegend.c. I'll reply to this thread once I have > an initial test version checked in to trunk. >
The initial version of pllegend is now in PLplot trunk, revision 11165. This adds: - pllegend.c: The implementation, including a C-port of get_character_height which is not exposed in the public API - x04c.c: The first page has been updated to include a legend, and symbols have been added to one of the lines to help illustrate the pllegend API I need to run for now, but hopefully this is a good start. pllegend.c has a comment explaining each of the function arguments. pllegend allows basic line or symbol legends in its current state. Comments on the API are more than welcome! 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