[IPython-User] Subplot legend not working on embedded plots?
Matthias BUSSONNIER
bussonniermatthias@gmail....
Wed Jul 25 13:19:55 CDT 2012
Le 25 juil. 2012 à 20:14, Adam Hughes a écrit :
> Hi,
>
> I'm using notebook with inline plots:
>
> ipython notebook --pylab inline
>
> And noticed that if I create a subplot, then try to add a legend using ax.legend(), the legend doesn't appear.
>
> something like:
>
> fig, ax=plt.subplots(1, figsize=(12,12) )
> ax.plot(x,y)
> ax.legend()
By setting a label in plot(), this works for me :
fig, ax=plt.subplots(1, figsize=(5,5) )
x,y = range(10),range(10)
ax.plot(x,y,label='mydata')
ax.legend()
--
Matthias
>
>
> Am I doing something incorrectly or is this a known bug?
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
More information about the IPython-User
mailing list