Matplotlib pyplot.title (string) retorna erro
Quando eu chamopyplot.title('some string')
lança a exceção,'str' object is not callable'
. Eu copiei o seguinte da documentação on-line do matplotlib:
mu, sigma = 100, 15
x = mu + sigma * np.random.randn(10000)
# the histogram of the data
n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75)
plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title('Histogram of IQ')
plt.text(60, .025, r'$\mu=100,\ \sigma=15e pegue
TypeError Traceback (most recent call last)
<ipython-input-158-40fe7a831b06> in <module>()
8 plt.xlabel('Smarts')
9 plt.ylabel('Probability')
---> 10 plt.title('Histogram of IQ')
11 plt.text(60, .025, r'$\mu=100,\ \sigma=15pyplot.suptitle()
funciona bem
Estou usando o python 2.7.5 e a última versão do matplotlib em um iMac com um processador I7 OSX 10.8 e 8 gig ram e ipython notebook.
Alguém sabe o que está acontecendo?
)
plt.axis([40, 160, 0, 0.03])
plt.grid(True)
plt.show()
e pegue
TypeError Traceback (most recent call last)
<ipython-input-158-40fe7a831b06> in <module>()
8 plt.xlabel('Smarts')
9 plt.ylabel('Probability')
---> 10 plt.title('Histogram of IQ')
11 plt.text(60, .025, r'$\mu=100,\ \sigma=15$')
12 plt.axis([40, 160, 0, 0.03])
TypeError: 'str' object is not callable
pyplot.suptitle()
funciona bem
Estou usando o python 2.7.5 e a última versão do matplotlib em um iMac com um processador I7 OSX 10.8 e 8 gig ram e ipython notebook.
Alguém sabe o que está acontecendo?
)
12 plt.axis([40, 160, 0, 0.03])
TypeError: 'str' object is not callable
pyplot.suptitle()
funciona bem
Estou usando o python 2.7.5 e a última versão do matplotlib em um iMac com um processador I7 OSX 10.8 e 8 gig ram e ipython notebook.
Alguém sabe o que está acontecendo?
) plt.axis([40, 160, 0, 0.03]) plt.grid(True) plt.show()e pegue
TypeError Traceback (most recent call last)
<ipython-input-158-40fe7a831b06> in <module>()
8 plt.xlabel('Smarts')
9 plt.ylabel('Probability')
---> 10 plt.title('Histogram of IQ')
11 plt.text(60, .025, r'$\mu=100,\ \sigma=15$')
12 plt.axis([40, 160, 0, 0.03])
TypeError: 'str' object is not callable
pyplot.suptitle()
funciona bem
Estou usando o python 2.7.5 e a última versão do matplotlib em um iMac com um processador I7 OSX 10.8 e 8 gig ram e ipython notebook.
Alguém sabe o que está acontecendo?