On Wed, Nov 03, 2010 at 12:56:40AM -0700, Alan Irwin wrote:
> Hi Hez:
> 
> I have made some additional progress with pllegend as of revision 11304.
> 
> 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.

Gnuplot also use a similar generic positioning for legends (i.e. top left)
which works well in my experience. They also provide for fine-grained
positioning by setting the coordinates of the legend (in plot coordinates). 
I think this approach works well. 95% of the time the general approach is
sufficient, and means things work even if the axes etc change, however
I do find the fine-grained control necessary on occasions to minimise
interference between the plot and the legend. I agree with Alan, that 
fixed positions for the custom origin are better. You can argue whether
you want them in relative coordinates (i.e. 0-1) or in the current 
axis coordinates. Probably relative I think, although there are arguments
each way.

Andrew

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to