Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f17f3f

Browse filesBrowse files
authored
Merge pull request #23864 from oscargus/anchoredartistdocs
Correct and improve documentation for anchored artists
2 parents 7518845 + db7e397 commit 9f17f3f
Copy full SHA for 9f17f3f

File tree

Expand file treeCollapse file tree

2 files changed

+18
-16
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+18
-16
lines changed

‎lib/mpl_toolkits/axes_grid1/anchored_artists.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/anchored_artists.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def __init__(self, width, height, xdescent, ydescent,
2323
Parameters
2424
----------
2525
width, height : float
26-
width and height of the container, in pixels.
26+
Width and height of the container, in pixels.
2727
xdescent, ydescent : float
28-
descent of the container in the x- and y- direction, in pixels.
28+
Descent of the container in the x- and y- direction, in pixels.
2929
loc : str
3030
Location of this artist. Valid locations are
3131
'upper left', 'upper center', 'upper right',
@@ -141,7 +141,7 @@ def __init__(self, transform, width, height, angle, loc,
141141
angle : float
142142
Rotation of the ellipse, in degrees, anti-clockwise.
143143
loc : str
144-
Location of this ellipse. Valid locations are
144+
Location of the ellipse. Valid locations are
145145
'upper left', 'upper center', 'upper right',
146146
'center left', 'center', 'center right',
147147
'lower left', 'lower center, 'lower right'.
@@ -191,7 +191,7 @@ def __init__(self, transform, size, label, loc,
191191
label : str
192192
Label to display.
193193
loc : str
194-
Location of this ellipse. Valid locations are
194+
Location of the size bar. Valid locations are
195195
'upper left', 'upper center', 'upper right',
196196
'center left', 'center', 'center right',
197197
'lower left', 'lower center, 'lower right'.
@@ -216,7 +216,7 @@ def __init__(self, transform, size, label, loc,
216216
fontproperties : `matplotlib.font_manager.FontProperties`, optional
217217
Font properties for the label text.
218218
fill_bar : bool, optional
219-
If True and if size_vertical is nonzero, the size bar will
219+
If True and if *size_vertical* is nonzero, the size bar will
220220
be filled in with the color specified by the size bar.
221221
Defaults to True if *size_vertical* is greater than
222222
zero and False otherwise.
@@ -311,7 +311,7 @@ def __init__(self, transform, label_x, label_y, length=0.15,
311311
fontsize : float, default: 0.08
312312
Size of label strings, given in coordinates of *transform*.
313313
loc : str, default: 'upper left'
314-
Location of this ellipse. Valid locations are
314+
Location of the arrow. Valid locations are
315315
'upper left', 'upper center', 'upper right',
316316
'center left', 'center', 'center right',
317317
'lower left', 'lower center, 'lower right'.

‎tutorials/text/annotations.py

Copy file name to clipboardExpand all lines: tutorials/text/annotations.py
+12-10Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@
304304
# artists) is known in pixel size during the time of creation. For
305305
# example, If you want to draw a circle with fixed size of 20 pixel x 20
306306
# pixel (radius = 10 pixel), you can utilize
307-
# ``AnchoredDrawingArea``. The instance is created with a size of the
308-
# drawing area (in pixels), and arbitrary artists can added to the
309-
# drawing area. Note that the extents of the artists that are added to
310-
# the drawing area are not related to the placement of the drawing
307+
# `~mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea`. The instance
308+
# is created with a size of the drawing area (in pixels), and arbitrary artists
309+
# can added to the drawing area. Note that the extents of the artists that are
310+
# added to the drawing area are not related to the placement of the drawing
311311
# area itself. Only the initial size matters.
312312
#
313313
# The artists that are added to the drawing area should not have a
@@ -330,9 +330,11 @@
330330
###############################################################################
331331
# Sometimes, you want your artists to scale with the data coordinate (or
332332
# coordinates other than canvas pixels). You can use
333-
# ``AnchoredAuxTransformBox`` class. This is similar to
334-
# ``AnchoredDrawingArea`` except that the extent of the artist is
335-
# determined during the drawing time respecting the specified transform.
333+
# `~mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox` class.
334+
# This is similar to
335+
# `~mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea` except that
336+
# the extent of the artist is determined during the drawing time respecting the
337+
# specified transform.
336338
#
337339
# The ellipse in the example below will have width and height
338340
# corresponding to 0.1 and 0.4 in data coordinates and will be
@@ -441,7 +443,7 @@
441443
# ~~~~~~~~~~~~~~~~~~~~~
442444
#
443445
# `.ConnectionPatch` is like an annotation without text. While `~.Axes.annotate`
444-
# is sufficient in most situations, ``ConnectionPatch`` is useful when you want to
446+
# is sufficient in most situations, `.ConnectionPatch` is useful when you want to
445447
# connect points in different axes. ::
446448
#
447449
# from matplotlib.patches import ConnectionPatch
@@ -457,7 +459,7 @@
457459
# :target: ../../gallery/userdemo/connect_simple01.html
458460
# :align: center
459461
#
460-
# Here, we added the ``ConnectionPatch`` to the *figure* (with `~.Figure.add_artist`)
462+
# Here, we added the `.ConnectionPatch` to the *figure* (with `~.Figure.add_artist`)
461463
# rather than to either axes: this ensures that it is drawn on top of both axes,
462464
# and is also necessary if using :doc:`constrained_layout
463465
# </tutorials/intermediate/constrainedlayout_guide>` for positioning the axes.
@@ -468,7 +470,7 @@
468470
# Zoom effect between Axes
469471
# ~~~~~~~~~~~~~~~~~~~~~~~~
470472
#
471-
# ``mpl_toolkits.axes_grid1.inset_locator`` defines some patch classes useful for
473+
# `mpl_toolkits.axes_grid1.inset_locator` defines some patch classes useful for
472474
# interconnecting two axes. Understanding the code requires some knowledge of
473475
# Matplotlib's transform system.
474476
#

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.