Python "'module' object is not callable" -


i'm trying make plot:

from matplotlib import * import sys pylab import *  f = figure ( figsize =(7,7) ) 

but error when try execute it:

  file "mratio.py", line 24, in <module>     f = figure( figsize=(7,7) ) typeerror: 'module' object not callable 

i have run similar script before, , think i've imported relevant modules.

the figure module provided matplotlib.

you can read more in matplotlib documentation

i think want matplotlib.figure.figure (the class, rather module)

it's documented here

from matplotlib import * import sys pylab import *  f = figure.figure( figsize =(7,7) ) 

or

from matplotlib import figure f = figure.figure( figsize =(7,7) ) 

or

from matplotlib.figure import figure f = figure( figsize =(7,7) ) 

or pylab work without conflicting matplotlib:

from matplotlib import * import sys import pylab pl  f = pl.figure( figsize =(7,7) ) 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -