Hi Paul,

Thanks for your prompt response. It did help :)

But it seems that axis don't seems to accept title, xlable and ylable values any more. Any ideas on that?

Cheers
Omer

On Wed, Mar 31, 2010 at 17:43, <PHobson@geosyntec.com> wrote:
From: Omer Khalid [mailto:Omer.Khalid@cern.ch]
Sent: Wednesday, March 31, 2010 6:20 AM
To: Matplotlib Users
Subject: [Matplotlib-users] How to show separate legend for each subplot

Hi,

I am wondering is there a way one could show a separate legend for each subplot in a figure? I would really really appreciate any ideas on this.
`~~~~~~~~~~~~~~~~~~~~~~~~~'

Omer,

Give this a shot:
# code --------->
import matplotlib.pyplot as pl
fig = pl.figure()
ax1 = fig.add_subplot(1,2,1)
ax2 = fig.add_subplot(1,2,2)

ax1.plot([1,2], [3,4], 'ko', label='First Axes')
ax2.plot([2,3], [4,5[, 'bs', label='Second Axes')

ax1.legend()
ax2.legend()
# <------------- code

There's also an example in the Examples section of the MPL website:
http://matplotlib.sourceforge.net/examples/pylab_examples/legend_demo3.html

Hope that helps,
-paul