Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Updates thegalleries/tutorials/artists.py
file in response to issue #28920#29080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -11,15 +11,15 @@ | ||||||
There are three layers to the Matplotlib API. | ||||||
* the :class:`!matplotlib.backend_bases.FigureCanvas` is the area onto which | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Actually, the previous way of expression is not exactly great - there is just no class Suggested change
And subsequently only use FigureCanvas as a given name (for the logical concept) without further highlighting. Or better, switch to But we can also leave all this for later. | ||||||
the figure is drawn | ||||||
* the :class:`!matplotlib.backend_bases.Renderer` is the object which knows how | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Same issue as above:Renderer is a concept realized through the subclasses of | ||||||
to draw on the :class:`!matplotlib.backend_bases.FigureCanvas` | ||||||
* and the :class:`matplotlib.artist.Artist` is the object that knows how to use | ||||||
a renderer to paint onto the canvas. | ||||||
The :class:`!matplotlib.backend_bases.FigureCanvas` and | ||||||
:class:`!matplotlib.backend_bases.Renderer` handle all the details of | ||||||
talking to user interface toolkits like `wxPython | ||||||
<https://www.wxpython.org>`_ or drawing languages like PostScript®, and | ||||||
the ``Artist`` handles all the high level constructs like representing | ||||||
@@ -156,12 +156,10 @@ class in the Matplotlib API, and the one you will be working with most | ||||||
# (the standard white box with black edges in the typical Matplotlib | ||||||
# plot, has a ``Rectangle`` instance that determines the color, | ||||||
# transparency, and other properties of the Axes. These instances are | ||||||
# stored as member variables :attr:`!Figure.patch` and :attr:`!Axes.patch` | ||||||
# ("Patch" is a name inherited from MATLAB, and is a 2D "patch" | ||||||
# of color on the figure, e.g., rectangles, circles and polygons). | ||||||
# Every Matplotlib ``Artist`` has the following properties | ||||||
# | ||||||
# ========== ================================================================= | ||||||
# Property Description | ||||||
@@ -284,7 +282,7 @@ class in the Matplotlib API, and the one you will be working with most | ||||||
# :class:`matplotlib.figure.Figure`, and it contains everything in the | ||||||
# figure. The background of the figure is a | ||||||
# :class:`~matplotlib.patches.Rectangle` which is stored in | ||||||
# :attr:`!Figure.patch`. As | ||||||
# you add subplots (:meth:`~matplotlib.figure.Figure.add_subplot`) and | ||||||
# Axes (:meth:`~matplotlib.figure.Figure.add_axes`) to the figure | ||||||
# these will be appended to the :attr:`Figure.axes | ||||||
@@ -331,8 +329,7 @@ class in the Matplotlib API, and the one you will be working with most | ||||||
# | ||||||
# As with all ``Artist``\s, you can control this coordinate system by setting | ||||||
# the transform property. You can explicitly use "figure coordinates" by | ||||||
# setting the ``Artist`` transform to :attr:`!fig.transFigure`: | ||||||
import matplotlib.lines as lines | ||||||
@@ -375,7 +372,7 @@ class in the Matplotlib API, and the one you will be working with most | ||||||
# customize the ``Artists`` it contains. Like the | ||||||
# :class:`~matplotlib.figure.Figure`, it contains a | ||||||
# :class:`~matplotlib.patches.Patch` | ||||||
# :attr:`!matplotlib.axes.Axes.patch` which is a | ||||||
# :class:`~matplotlib.patches.Rectangle` for Cartesian coordinates and a | ||||||
# :class:`~matplotlib.patches.Circle` for polar coordinates; this patch | ||||||
# determines the shape, background and border of the plotting region:: | ||||||
@@ -408,8 +405,7 @@ class in the Matplotlib API, and the one you will be working with most | ||||||
# | ||||||
# Similarly, methods that create patches, like | ||||||
# :meth:`~matplotlib.axes.Axes.bar` creates a list of rectangles, will | ||||||
# add the patches to the :attr:`!Axes.patches` list: | ||||||
# | ||||||
# .. sourcecode:: ipython | ||||||
# | ||||||
@@ -556,8 +552,8 @@ class in the Matplotlib API, and the one you will be working with most | ||||||
# important ``Artist`` containers: the :class:`~matplotlib.axis.XAxis` | ||||||
# and :class:`~matplotlib.axis.YAxis`, which handle the drawing of the | ||||||
# ticks and labels. These are stored as instance variables | ||||||
# :attr:`!matplotlib.axes.Axes.xaxis` and | ||||||
# :attr:`!matplotlib.axes.Axes.yaxis`. The ``XAxis`` and ``YAxis`` | ||||||
# containers will be detailed below, but note that the ``Axes`` contains | ||||||
# many helper methods which forward calls on to the | ||||||
# :class:`~matplotlib.axis.Axis` instances, so you often do not need to | ||||||