[IPython-User] matplotlib and Ipython notebook : figsize not recognized in standard python/ipython

Fernando Perez fperez.net@gmail....
Mon Apr 2 12:35:50 CDT 2012


On Mon, Apr 2, 2012 at 10:04 AM, Massimo Di Stefano
<massimodisasha@gmail.com> wrote:
> import matplotlib.pyplot as plt
> fig = plt.figure(figsize(10,8))
>
>
> but if i include thi line in a scrip and try to execute it from inside the
> notebook or from a python/ipython shell i got the error :
>
> name 'figsize' is not defined
>
> can you help me to fix this issue ?

fig = plt.figure(figsize=(10,8))

you were missing the = sign, it's a keyword argument

f


More information about the IPython-User mailing list