Re: [Plplot-devel] Volunteer requested to implement legend-drawing capability for the PLplot core library.
On Thu, Sep 9, 2010 at 3:00 PM, Alan W. Irwin wrote: > I am transferring this discussion from plplot-general to plplot-devel > with a different subject. > > On 2010-09-09 10:36-0400 Hezekiah M. Carty wrote: > >> The OCaml bindings include a character_height function which (should?) >> return the character height in world coordinates: >> >> >> http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/bindings/ocaml/plplot.ml?revision=11020&view=markup >> >> The function begins on line 611 and should be fairly self-explanatory. >> There is likely a simpler way to do this using internal PLplot >> functions, but this method allows you to stick to the public, >> documented API. >> > > I am not that good at reading OCaml code, but it looks like the method > combines results from plgch, plgvpd, plgspa, and plgvpw. From the > documentation of those, you should be able to use the combination of > plgspa and plgvpd to obtain the viewport limits in mm. Then combine > those results with plgvpw results (which obtains the viewport limits > in world coordinates) to determine the ratio of world coordinates to > mm in the y direction. Then use that factor to transform plgchr > height results in mm to world coordinates. So I think this idea > should work fine, but it would not be necessary if we had a central > libplplot pllegend capability which simply accessed the required > internal variables directly. > I think I'll stick with a direct port using the public API for the first pass. This can be relaxed once the port to C is working acceptably. > 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. 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
Re: [Plplot-devel] ABI compliance tracker
Just to give an update on this topic to this list, I agreed with Hazen off list to make checking for backwards-incompatible changes in our API with abi-compliance-checker as easy as possible for him. Accordingly, I have made some good initial progress with creating scripts/check_backwards_incompatible_api.sh, a bash script to build and install the working copy of PLplot from the local directory where the script resides and to build and install a reference version of PLplot specified by the user (5.9.6 by default). The bash script also processes a template file with sed to create appropriate abi-compliance-checker *.xml files. Those files allow abi-compliance-checker to do its job comparing the ABI of the reference install with the working-copy install. The Debian version 1.6 of abi-compliance checker doesn't work at all, but I discovered that a downloaded version 1.21.4 of this perl script works fine for simple PLplot libraries like libqsastime. That result was most encouraging. Therefore, I have checked in (revision 11164) what I have accomplished so far. Note my work is not ready for prime time yet. For example, if the two headers required for libqsastime are expanded to the full set of PLplot headers abi-compliance-checker currently stops with a compile error. This weekend, I hope to rectify this issue and others to achieve the goal of making Hazen's API checking life as simple as possible for each of our C and C++ libraries. 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); PLplot scientific plotting software package (plplot.org); 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 __ -- 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
Re: [Plplot-devel] Volunteer requested to implement legend-drawing capability for the PLplot core library.
On Fri, Sep 10, 2010 at 6:01 PM, Hezekiah M. Carty wrote: > On Thu, Sep 9, 2010 at 3:00 PM, Alan W. Irwin > 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
Re: [Plplot-devel] Volunteer requested to implement legend-drawing capability for the PLplot core library.
On 2010-09-10 18:46-0400 Hezekiah M. Carty wrote: > The initial version of pllegend is now in PLplot trunk, revision > 11165. Thanks very much for this effort. However, it appears you forgot to svn add and commit your new pllegend.c. Once that rather urgent (since it makes builds impossible) issue is straightened out, I look forward to seeing what the new legend is going to look like for example 4. 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); PLplot scientific plotting software package (plplot.org); 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 __ -- 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
Re: [Plplot-devel] Volunteer requested to implement legend-drawing capability for the PLplot core library.
On Fri, Sep 10, 2010 at 9:09 PM, Alan W. Irwin wrote: > On 2010-09-10 18:46-0400 Hezekiah M. Carty wrote: > >> The initial version of pllegend is now in PLplot trunk, revision >> 11165. > > Thanks very much for this effort. However, it appears you forgot to > svn add and commit your new pllegend.c. Once that rather urgent > (since it makes builds impossible) issue is straightened out, I look > forward to seeing what the new legend is going to look like for > example 4. > Ouch - that's quite embarrassing! Thank you for pointing out the oversight, and my apologies for missing that. Revision 11166 adds pllegend.c, and will hopefully build successfully. 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