@@ -68,19 +68,20 @@ an ``Axes`` at an arbitrary location, simply use the
6868of ``[left, bottom, width, height] `` values in 0-1 relative figure
6969coordinates::
7070
71- ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3])
71+ fig2 = plt.figure()
72+ ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3])
7273
7374Continuing with our example::
7475
7576 import numpy as np
7677 t = np.arange(0.0, 1.0, 0.01)
7778 s = np.sin(2*np.pi*t)
78- line, = ax1 .plot(t, s, color='blue', lw=2)
79+ line, = ax .plot(t, s, color='blue', lw=2)
7980
8081In this example, ``ax `` is the ``Axes `` instance created by the
8182``fig.add_subplot `` call above (remember ``Subplot `` is just a
82- subclass of ``Axes ``) and when you call ``ax.plot ``, it creates a
83- ``Line2D `` instance and adds it the the :attr: `Axes.lines
83+ subclass of ``Axes ``) and when you call ``ax.plot ``, it createsa
84+ ``Line2D `` instance and adds it the :attr: `Axes.lines
8485<matplotlib.axes.Axes.lines> ` list. In the interactive `ipython
8586<http://ipython.scipy.org/> `_ session below, you can see that
8687``Axes.lines `` list is length one and contains the same line that was
0 commit comments