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

Skip to content

Commit e0a1572

Browse files
committed
Format parameters in descriptions with emph instead of backticks
1 parent f51bf2b commit e0a1572

28 files changed

Lines changed: 72 additions & 73 deletions

examples/axes_grid1/inset_locator_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# height and optionally a location (loc) that accepts locations as codes,
1212
# similar to `~matplotlib.axes.Axes.legend`.
1313
# By default, the inset is offset by some points from the axes,
14-
# controlled via the `borderpad` parameter.
14+
# controlled via the *borderpad* parameter.
1515

1616
import matplotlib.pyplot as plt
1717
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
@@ -44,11 +44,11 @@
4444

4545

4646
###############################################################################
47-
# The arguments `bbox_to_anchor` and `bbox_transfrom` can be used for a more
47+
# The arguments *bbox_to_anchor* and *bbox_transfrom* can be used for a more
4848
# fine grained control over the inset position and size or even to position
4949
# the inset at completely arbitrary positions.
50-
# The `bbox_to_anchor` sets the bounding box in coordinates according to the
51-
# `bbox_transform`.
50+
# The *bbox_to_anchor* sets the bounding box in coordinates according to the
51+
# *bbox_transform*.
5252
#
5353

5454
fig = plt.figure(figsize=[5.5, 2.8])

examples/statistics/confidence_ellipse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
def confidence_ellipse(x, y, ax, n_std=3.0, facecolor='none', **kwargs):
4242
"""
43-
Create a plot of the covariance confidence ellipse of `x` and `y`
43+
Create a plot of the covariance confidence ellipse of *x* and *y*.
4444
4545
Parameters
4646
----------

lib/matplotlib/_constrained_layout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def layoutcolorbarsingle(ax, cax, shrink, aspect, location, pad=0.05):
515515
"""
516516
Do the layout for a colorbar, to not overly pollute colorbar.py
517517
518-
`pad` is in fraction of the original axis size.
518+
*pad* is in fraction of the original axis size.
519519
"""
520520
axlb = ax._layoutbox
521521
axpos = ax._poslayoutbox
@@ -604,7 +604,7 @@ def layoutcolorbargridspec(parents, cax, shrink, aspect, location, pad=0.05):
604604
"""
605605
Do the layout for a colorbar, to not overly pollute colorbar.py
606606
607-
`pad` is in fraction of the original axis size.
607+
*pad* is in fraction of the original axis size.
608608
"""
609609

610610
gs = parents[0].get_subplotspec().get_gridspec()

lib/matplotlib/_layoutbox.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ def edit_width(self, width, strength='strong'):
319319
sol.suggestValue(self.width, width)
320320

321321
def constrain_width(self, width, strength='strong'):
322-
'''
323-
Constrain the width of the layout box. `width` is
322+
"""
323+
Constrain the width of the layout box. *width* is
324324
either a float or a layoutbox.width.
325-
'''
325+
"""
326326
c = (self.width == width)
327327
self.solver.addConstraint(c | strength)
328328

@@ -471,7 +471,7 @@ def __repr__(self):
471471
def hstack(boxes, padding=0, strength='strong'):
472472
'''
473473
Stack LayoutBox instances from left to right.
474-
`padding` is in figure-relative units.
474+
*padding* is in figure-relative units.
475475
'''
476476

477477
for i in range(1, len(boxes)):

lib/matplotlib/artist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def set_figure(self, fig):
681681
if self.figure is fig:
682682
return
683683
# if we currently have a figure (the case of both `self.figure`
684-
# and `fig` being none is taken care of above) we then user is
684+
# and *fig* being none is taken care of above) we then user is
685685
# trying to change the figure an artist is associated with which
686686
# is not allowed for the same reason as adding the same instance
687687
# to more than one Axes
@@ -1518,7 +1518,7 @@ def setp(obj, *args, **kwargs):
15181518
... long output listing omitted
15191519
15201520
You may specify another output file to `setp` if `sys.stdout` is not
1521-
acceptable for some reason using the `file` keyword-only argument::
1521+
acceptable for some reason using the *file* keyword-only argument::
15221522
15231523
>>> with fopen('output.log') as f:
15241524
>>> setp(line, file=f)

lib/matplotlib/axes/_axes.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def set_title(self, label, fontdict=None, loc=None, pad=None,
160160
161161
fontdict : dict
162162
A dictionary controlling the appearance of the title text,
163-
the default `fontdict` is::
163+
the default *fontdict* is::
164164
165165
{'fontsize': rcParams['axes.titlesize'],
166166
'fontweight' : rcParams['axes.titleweight'],
@@ -723,7 +723,7 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
723723
... verticalalignment='center', transform=ax.transAxes)
724724
725725
You can put a rectangular box around the text instance (e.g., to
726-
set a background color) by using the keyword `bbox`. `bbox` is
726+
set a background color) by using the keyword *bbox*. *bbox* is
727727
a dictionary of `~matplotlib.patches.Rectangle`
728728
properties. For example::
729729
@@ -967,8 +967,8 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
967967
"""
968968
Add a vertical span (rectangle) across the axes.
969969
970-
Draw a vertical span (rectangle) from `xmin` to `xmax`. With
971-
the default values of `ymin` = 0 and `ymax` = 1. This always
970+
Draw a vertical span (rectangle) from *xmin* to *xmax*. With
971+
the default values of *ymin* = 0 and *ymax* = 1. This always
972972
spans the yrange, regardless of the ylim settings, even if you
973973
change them, e.g., with the :meth:`set_ylim` command. That is,
974974
the vertical extent is in axes coords: 0=bottom, 0.5=middle,
@@ -3680,7 +3680,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
36803680
# if non-default sym value, put it into the flier dictionary
36813681
# the logic for providing the default symbol ('b+') now lives
36823682
# in bxp in the initial value of final_flierprops
3683-
# handle all of the `sym` related logic here so we only have to pass
3683+
# handle all of the *sym* related logic here so we only have to pass
36843684
# on the flierprops dict.
36853685
if sym is not None:
36863686
# no-flier case, which should really be done with
@@ -6351,12 +6351,12 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
63516351
If an integer is given, ``bins + 1`` bin edges are calculated and
63526352
returned, consistent with `numpy.histogram`.
63536353
6354-
If `bins` is a sequence, gives bin edges, including left edge of
6355-
first bin and right edge of last bin. In this case, `bins` is
6354+
If *bins* is a sequence, gives bin edges, including left edge of
6355+
first bin and right edge of last bin. In this case, *bins* is
63566356
returned unmodified.
63576357
63586358
All but the last (righthand-most) bin is half-open. In other
6359-
words, if `bins` is::
6359+
words, if *bins* is::
63606360
63616361
[1, 2, 3, 4]
63626362
@@ -7911,7 +7911,7 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,
79117911
showmeans=False, showextrema=True, showmedians=False):
79127912
"""Drawing function for violin plots.
79137913
7914-
Draw a violin plot for each column of `vpstats`. Each filled area
7914+
Draw a violin plot for each column of *vpstats*. Each filled area
79157915
extends to represent the entire data range, with optional lines at the
79167916
mean, the median, the minimum, the maximum, and the quantiles values.
79177917

lib/matplotlib/axes/_base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,7 @@ def get_xticklabels(self, minor=False, which=None):
33873387
else return the major ticklabels.
33883388
33893389
which : None, ('minor', 'major', 'both')
3390-
Overrides `minor`.
3390+
Overrides *minor*.
33913391
33923392
Selects which ticklabels to return
33933393
@@ -3411,7 +3411,7 @@ def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
34113411
34123412
fontdict : dict, optional
34133413
A dictionary controlling the appearance of the ticklabels.
3414-
The default `fontdict` is::
3414+
The default *fontdict* is::
34153415
34163416
{'fontsize': rcParams['axes.titlesize'],
34173417
'fontweight': rcParams['axes.titleweight'],
@@ -3770,7 +3770,7 @@ def get_yticklabels(self, minor=False, which=None):
37703770
else return the major ticklabels
37713771
37723772
which : None, ('minor', 'major', 'both')
3773-
Overrides `minor`.
3773+
Overrides *minor*.
37743774
37753775
Selects which ticklabels to return
37763776
@@ -3794,7 +3794,7 @@ def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
37943794
37953795
fontdict : dict, optional
37963796
A dictionary controlling the appearance of the ticklabels.
3797-
The default `fontdict` is::
3797+
The default *fontdict* is::
37983798
37993799
{'fontsize': rcParams['axes.titlesize'],
38003800
'fontweight': rcParams['axes.titleweight'],

lib/matplotlib/axis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ def get_ticklabels(self, minor=False, which=None):
12951295
else return the major ticklabels
12961296
12971297
which : None, ('minor', 'major', 'both')
1298-
Overrides `minor`.
1298+
Overrides *minor*.
12991299
13001300
Selects which ticklabels to return
13011301

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ def draw_image(self, gc, x, y, im, transform=None):
481481
form of a :class:`~matplotlib.transforms.Affine2DBase` instance.
482482
The translation vector of the transformation is given in physical
483483
units (i.e., dots or pixels). Note that the transformation does not
484-
override `x` and `y`, and has to be applied *before* translating
485-
the result by `x` and `y` (this can be accomplished by adding `x`
486-
and `y` to the translation vector defined by `transform`).
484+
override *x* and *y*, and has to be applied *before* translating
485+
the result by *x* and *y* (this can be accomplished by adding *x*
486+
and *y* to the translation vector defined by *transform*).
487487
"""
488488
raise NotImplementedError
489489

@@ -1000,10 +1000,10 @@ def get_sketch_params(self):
10001000
10011001
A 3-tuple with the following elements:
10021002
1003-
* `scale`: The amplitude of the wiggle perpendicular to the
1003+
* ``scale``: The amplitude of the wiggle perpendicular to the
10041004
source line.
1005-
* `length`: The length of the wiggle along the line.
1006-
* `randomness`: The scale factor by which the length is
1005+
* ``length``: The length of the wiggle along the line.
1006+
* ``randomness``: The scale factor by which the length is
10071007
shrunken or expanded.
10081008
10091009
May return `None` if no sketch parameters were set.

lib/matplotlib/backend_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ToolBase:
7575
Filename of the image
7676
7777
**String**: Filename of the image to use in the toolbar. If None, the
78-
`name` is used as a label in the toolbar button
78+
*name* is used as a label in the toolbar button
7979
"""
8080

8181
def __init__(self, toolmanager, name):

0 commit comments

Comments
 (0)