[Matplotlib-users] fig.legend method and axes.legend method behaves differently?
efiring at hawaii.edu
Fri Jan 12 02:31:11 EST 2018
It looks like the bbox_to_anchor argument is causing the problem. If
you try this:
legend = fig.legend(handles, labels,
it works, with 'upper center' or 'lower center'.
On 2018/01/07 6:16 AM, Henry east wrote:
> I tried to make a plot with two subplots but only one legend since the
> two subplots express the same set of information.
> I put the legend outside of the two subplots for better interpretation.
> I have found that by using |fig.legend| instead of
> the |ax.legend| method. In the saved plot, the legend box are just cut off.
> I tried to fix this by using |bbox_extra_artists| argument in the
> |savefig| method, following the instruction
> But it does not work. The following code illustrate the problem,
More information about the Matplotlib-users