On Wed, Sep 28, 2011 at 3:32 PM, Klonuo Umom <klo...@gmail.com> wrote: > How to deal with this, without manually positioning legends and if possible > including all annotated plot lines in one legend?
*twinx* creates a new axes. Thus there are TWO axes, and you need to do some manual adjustment. I believe that the solution suggested by Stephen George is essentially the best way, although you may try to tweak things using the Axes.get_legend_handles_labels method ( http://matplotlib.sourceforge.net/users/legend_guide.html#what-to-be-displayed ). Alternatively, you can try the axes_grid1 toolkit which automatically merges legends for you. Check out the example below. http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#example-1-twinx Regards, -JJ ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users