[Tioga-users] Help with legend placement on scatter plot
Bill Paxton
paxton at kitp.ucsb.edu
Tue May 6 21:22:54 EDT 2008
On May 6, 2008, at 5:52 PM, David MacMahon wrote:
> Quick question: Must one know in advance how many legend entries
> there will be so that legend_bottom_margin can be set appropriately
> (assuming the legend starts near the top)? If so, how does one
> calculate the legend height? Presumably, legend_bottom_margin =
> 1.0 - legend_top_margin - legend_height, where legend_height
> depends on the number of entries and each entry's height.
Hi Dave,
Quick answer to your quick question is that I think the legend
interface needs some work!
Perhaps you'd like to volunteer? ; - )
The show_legend routine in FigMrk.rb calculates the placement of
legend entries. Take a look and see how it sets and modifies the y
coordinate. It is using self.default_text_height_dy and
self.legend_scale and self.legend_text_ystart.
Let me know if I can clarify anything in the code.
Cheers,
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/tioga-users/attachments/20080506/e5ca8376/attachment.html>
More information about the Tioga-users
mailing list