figure legend overlapping with the axes title

I am using figure.legend function to create a legend. See the code line below.

legend = fig.legend(ax.get_lines(), labellist, ncol=4, loc='upper center', prop=fontprop)

However, using the loc='upper center' where legend overlapps the axes title. I also tried the setting loc='lower center'. In this case, figure legend overlapps the x-axis label.

Am I missing some parameter ? How I can place the figure legend below the x-axis label ? Is there a way to place the figure legend below the axes title ?

regards,
Nitin

Nitin Bhide

···

--------------------------------------------------------------------
Never attribute to malice that which can be adequately explained by stupidity
-- Hanlon's razor
*****************************************************************************

It always helps if you post complete working examples that illustrate
your problem, then we can modify them to show you how to fix your
problem. In this case you may want to look at fig.subplots_adjust to
lower the top of your subplot so that the axes title does not overlap
the figure legend::

  fig.subplots_adjust(top=0.8)

JDH

···

On Sun, Jan 4, 2009 at 10:27 AM, Nitin Bhide <nitinbhide@...9...> wrote:

I am using figure.legend function to create a legend. See the code line below.

legend = fig.legend(ax.get_lines(), labellist, ncol=4, loc='upper center', prop=fontprop)

However, using the loc='upper center' where legend overlapps the axes title. I also tried the setting loc='lower center'. In this case, figure legend overlapps the x-axis label.

Am I missing some parameter ? How I can place the figure legend below the x-axis label ? Is there a way to place the figure legend below the axes title ?