Skip to content

Commit bbffaa2

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR matplotlib#31696: DOC: correct some outdated points in Artist tutorial
1 parent bc8b78a commit bbffaa2

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

galleries/tutorials/artists.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@
3838
helper methods to create the primitives. In the example below, we create a
3939
``Figure`` instance using :func:`matplotlib.pyplot.figure`, which is a
4040
convenience method for instantiating ``Figure`` instances and connecting them
41-
with your user interface or drawing toolkit ``FigureCanvas``. As we will
42-
discuss below, this is not necessary -- you can work directly with PostScript,
43-
PDF Gtk+, or wxPython ``FigureCanvas`` instances, instantiate your ``Figures``
44-
directly and connect them yourselves -- but since we are focusing here on the
45-
``Artist`` API we'll let :mod:`~matplotlib.pyplot` handle some of those details
46-
for us::
41+
with a GUI framework so that they can be shown in a window on the screen::
4742
4843
import matplotlib.pyplot as plt
4944
fig = plt.figure()
@@ -94,9 +89,8 @@ class in the Matplotlib API, and the one you will be working with most
9489
In [102]: line
9590
Out[102]: <matplotlib.lines.Line2D at 0x19a95710>
9691
97-
If you make subsequent calls to ``ax.plot`` (and the hold state is "on"
98-
which is the default) then additional lines will be added to the list.
99-
You can remove a line later by calling its ``remove`` method::
92+
If you make subsequent calls to ``ax.plot`` then additional lines will be added
93+
to the list. You can remove a line later by calling its ``remove`` method::
10094
10195
line = ax.lines[0]
10296
line.remove()
@@ -301,7 +295,7 @@ class in the Matplotlib API, and the one you will be working with most
301295
# Out[159]: <Axes:>
302296
#
303297
# In [160]: print(fig.axes)
304-
# [<Axes:>, <matplotlib.axes._axes.Axes object at 0x7f0768702be0>]
298+
# [<Axes: >, <Axes: >]
305299
#
306300
# Because the figure maintains the concept of the "current Axes" (see
307301
# :meth:`Figure.gca <matplotlib.figure.Figure.gca>` and

0 commit comments

Comments
 (0)