Figure and axes methods in matplotlib

use ax1.set_title('foo') instead

ax1.title returns a matplotlib.text.Textobject:

In [289]: ax1.set_title('foo')
Out[289]: <matplotlib.text.Text at 0x939cdb0>

In [290]: print ax1.title
Text(0.5,1,'foo')

You can also add a centered title to the figure when there are multiple AxesSubplot:

In [152]: fig, ax=plt.subplots(1, 2)
     ...: fig.suptitle('title of subplots')
Out[152]: <matplotlib.text.Text at 0x94cf650>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)