AttributeError: 'function' object has no attribute 'add_subplot' when using matplotlib in ipython
<p>Hi, I was trying some code from WesMckinney's python data analysis book in ipython environment,which is built in anaconda. When I typed the simple code like </p>

<pre><code>import matplotlib.pyplot as plt

fig = plt.figure

ax1 = fig.add_subplot(2,2,1)
Traceback (most recent call last):

File "&lt;ipython-input-9-559e30a6412a&gt;", line 1, in &lt;module&gt;
ax1 = fig.add_subplot(2,2,1)

AttributeError: 'function' object has no attribute 'add_subplot'
</code></pre>

<p>An AttributeError arose, but it's weird since anaconda is surely installed with <code>matplotlib</code> module. So Any suggestion? thank you.</p>