Hi Hez: I have made some additional progress with pllegend as of revision 11304.
On 2010-10-17 23:03-0700 Alan W. Irwin wrote: > On 2010-10-17 21:28-0400 Hezekiah M. Carty wrote: > >> On Sun, Oct 17, 2010 at 3:12 PM, Hezekiah M. Carty > >>> 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 think this is a good idea. The independent QSAS plot legend also > has the option of painting a bounding box for the legend. DONE both with colour and linestyle capabilities. > [out of order] I am thinking of an API > where you specify nrow and ncolumn. Normally, the nrow by ncolumn > cells would be filled in column-major order with nlegend <= > nrow*ncolumn entries, but if the PL_LEGEND_ROW_MAJOR bit were set, the > cell filling would be done in row-major order rather than the default > column-major order. DONE as described. Items I hope to implement in the next day or so: 1. Specify the x, y position and length of plotted area in normalized viewport coordinates rather than the current normalized sub-page coordinates. Of course, despite this change in coordinates, the results will still be clipped at the sub-page boundary rather than viewport boundary. 2. Implement plstring(n, x, y, string) API to write string (normally just one glyph) at the specified array of x, y points. Note, string is a normal PLplot user-input string including the possibility of UTF-8 (including the ascii subset of that) and the normal PLplot text escape sequences. plstring is planned to be a fully unicode-aware replacement for plsymbol and plpoin. Use plstring to render the symbols used for the green lines in examples 4 and 26. 3. Replace plpoin symbol indices with strings in pllegend, and use plstring internally in pllegend to render those strings with corresponding examples 4 and 26 legend changes. 4. (after further discussion with you). >> 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. The QSAS team uses a number of fixed legend positions e.g., "inside top right" would place the top right corner of the legend coincident with the top right corner of the viewport while "inside bottom left" would place the bottom left corner of the legend coincident with the bottom left of the viewport. They also have "inside top left", "inside bottom right", "above top centre", and "outside top right". I am not exactly sure of the exact definition/usefulness of the last two. They also allow a customized position like we have now. I think I prefer the QSAS legend position ideas over your idea above of changing the origin of the custom coordinates. The fixed positions will be useful, and it is more straightforward for users to have a consistent origin for the customized positions (especially when the values at the edges of the viewport are either 0. or 1.). However, it is important to come to consensus about this since we want the same position options for your plcolorbar so I look forward to your response to the QSAS legend position ideas. 5. doxygen and docbook documentation changes to reflect the above changes to pllegend. 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 __________________________ ------------------------------------------------------------------------------ Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel