[Tioga-users] Help with legend placement on scatter plot

David MacMahon davidm at astro.berkeley.edu
Tue May 6 23:56:17 EDT 2008


Thanks (again) for the pointers!

Dave

On May 6, 2008, at 18:22 , Bill Paxton wrote:
>
> 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
>



More information about the Tioga-users mailing list