Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 17587a3

Browse files
committed
fixed a couple typos in artists.rst
svn path=/trunk/matplotlib/; revision=5735
1 parent aac37ca commit 17587a3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

doc/users/artists.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,20 @@ an ``Axes`` at an arbitrary location, simply use the
6868
of ``[left, bottom, width, height]`` values in 0-1 relative figure
6969
coordinates::
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

7374
Continuing 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

8081
In 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

Comments
 (0)