>>>>> "danny" == danny shevitz <dan...@ya...> writes:
danny> I have a main routine that calls a subroutine twice. In the
danny> subroutine, a plot is drawn. If the active figure is the
danny> same, both plots are shown at the same time in the same
danny> figure. The problem is that both plots have legends, and it
danny> appears as if a figure can only have one legend, so one of
danny> the legends is overwritten (the first). The question is,
danny> what is the best way to get the legends to be appended so
danny> that all graph lines have legends.
I don't really understand what your problem is, but I have a few
comments.
For "figure legends" you want to use the figlegend command, as opposed
to axes legends which use the legend command. You can have an
arbitrary number of figure legends on the same figure.
However, there is a bug in the figure legend code in matplotlib-0.54.2
that Jim Benson discovered. In matplotlib/figure.py, you need to
replace the line that reads
l = Legend(handles, labels, loc)
with
l = Legend(self, handles, labels, loc)
If you have more troubles, please post some code as that might help me
understand what you are trying to do.
JDH
danny> __________________________________ Do you Yahoo!? Yahoo!
danny> Mail is new and improved - Check it out!
danny> http://promotions.yahoo.com/new_mail
danny> -------------------------------------------------------
danny> This SF.Net email sponsored by Black Hat Briefings &
danny> Training. Attend Black Hat Briefings & Training, Las Vegas
danny> July 24-29 - digital self defense, top technical experts,
danny> no vendor pitches, unmatched networking
danny> opportunities. Visit www.blackhat.com
danny> _______________________________________________
danny> Matplotlib-users mailing list
danny> Mat...@li...
danny> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|