On Sun, Oct 17, 2010 at 3:12 PM, Hezekiah M. Carty <hezekiahca...@users.sourceforge.net> wrote: > On Mon, Oct 4, 2010 at 9:36 PM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> > wrote: >> >> As a result of my propagation work, I now get consistent results for >> python and C for both examples 4 and 26. Others may also want to >> propagate pllegend to their favorite languages at this time. However, >> you should be aware that once Hez and Andrew have propagated pllegend >> to OCaml and Octave and compared its capabilities with the older >> legend capabilities for those languages, we might get some suggested >> changes in the pllegend API out of those comparisons. If those >> changes actually occur I am willing to modify my python propagation >> accordingly, but others may want to wait to propagate pllegend until >> we get feedback from Hez and Andrew on their experiences with pllegend >> for OCaml and Octave. >> > > One suggestion I have for the API is to add a box/outline option for > the pllegend window (PL_LEGEND_BOX as another option for the opt > parameter?). I'm not sure how the color of the box should be added to > the API - we already get a background color argument, and I'm > concerned about pllegend's already long argument list becoming longer > with every new option added. >
I have started work on the plcolorbar API. I don't expect to have it done today, but it did bring up some API/functionality changes I would like to propose for pllegend (and use in plcolorbar). 1. I think it is worth considering different ways of expressing the position of a legend or color bar. For example, in the OCaml color bar API, the position of the color bar is specified relative to a user-specified plot subpage boundary. This could be done in the C API with another set of options for the "opt" parameter: PL_LEGEND_TOP, PL_LEGEND_BOTTOM, PL_LEGEND_LEFT, PL_LEGEND_RIGHT and possibly PL_LEGEND_CENTER. The position arguments would then be interpreted as offsets from the given side. For example: PL_LEGEND_BOTTOM | PL_LEGEND_RIGHT : Position the box relative to the bottom-right of the plot subpage PL_LEGEND_RIGHT | PL_LEGEND_CENTER : Position the box relative to the right side of the plot subpage, centered vertically (the y-position would be ignored in this case) The default would continue to be PL_LEGEND_TOP | PL_LEGEND_LEFT. I expect PL_LEGEND_CENTER to be more commonly used with plcolorbar. 2. Allow a user to specify if they want the legend positioned relative to the plot window or the plot subpage (PL_LEGEND_PAGE or PL_LEGEND_WINDOW?). The position would be (possibly normalized) plot window coordinates for PL_LEGEND_WINDOW and normalized subpage coordinates for PL_LEGEND_PAGE. Sizes/lengths would probably still be specified as normalized subpage coordinates. I expect most of the "opt"-appropriate options to be shared between pllegend and plcolorbar. If the rest of you feel that these changes are reasonable, I am willing to make or help make the required changes to the C implementation of pllegend. Hez ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel