Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions galleries/tutorials/artists.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
helper methods to create the primitives. In the example below, we create a
``Figure`` instance using :func:`matplotlib.pyplot.figure`, which is a
convenience method for instantiating ``Figure`` instances and connecting them
with your user interface or drawing toolkit ``FigureCanvas``. As we will
discuss below, this is not necessary -- you can work directly with PostScript,
PDF Gtk+, or wxPython ``FigureCanvas`` instances, instantiate your ``Figures``
directly and connect them yourselves -- but since we are focusing here on the
``Artist`` API we'll let :mod:`~matplotlib.pyplot` handle some of those details
for us::
with a GUI framework so that they can be shown in a window on the screen::

import matplotlib.pyplot as plt
fig = plt.figure()
Expand Down Expand Up @@ -94,9 +89,8 @@ class in the Matplotlib API, and the one you will be working with most
In [102]: line
Out[102]: <matplotlib.lines.Line2D at 0x19a95710>

If you make subsequent calls to ``ax.plot`` (and the hold state is "on"
which is the default) then additional lines will be added to the list.
You can remove a line later by calling its ``remove`` method::
If you make subsequent calls to ``ax.plot`` then additional lines will be added
to the list. You can remove a line later by calling its ``remove`` method::

line = ax.lines[0]
line.remove()
Expand Down Expand Up @@ -301,7 +295,7 @@ class in the Matplotlib API, and the one you will be working with most
# Out[159]: <Axes:>
#
# In [160]: print(fig.axes)
# [<Axes:>, <matplotlib.axes._axes.Axes object at 0x7f0768702be0>]
# [<Axes: >, <Axes: >]
#
# Because the figure maintains the concept of the "current Axes" (see
# :meth:`Figure.gca <matplotlib.figure.Figure.gca>` and
Expand Down
Loading