[Tioga-users] Help with legend placement on scatter plot
Taro Sato
nomo17k at gmail.com
Tue May 6 15:32:05 EDT 2008
On Tue, May 6, 2008 at 12:14 PM, David MacMahon
<davidm at astro.berkeley.edu> wrote:
> I'm having a hard time getting a legend to work well with a scatter (i.e.
> marker) plot. I've attached a short script showing what I'm doing and the
> pdf file that results. The script only works with a recent SVN version of
> Tioga (i.e. won't work with Tioga 1.8). It works OK except for the
> placement of the legend.
>
> My scatter plots (but not the sample script) have many markers of different
> colors and sizes. I can put a color bar beside the plot to show the meaning
> of the colors, but I'd also like to show a few "representative" markers of
> various sizes in the legend with associated their values as text so the
> viewer can get some idea of what the different sizes mean.
>
> If anyone can give me a pointer or two, I'd appreciate it!
>
> Thanks,
> Dave
>
Dave -- One thing you could do is to make a fake data just for the
purpose of controlling legend. If the data coordinates are set to be
outside of the plot range, they won't show up in the plot, but you can
then fully control what to show in the legend. I remember doing that
myself before, which worked okay.
(That's not an elegant solution of course, but I think we all agree
that the legend implementation is something that needs more work at
this point...)
Cheers,
Taro
More information about the Tioga-users
mailing list