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

[Doc] fix more spelling and grammar #24523

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
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
58 changes: 29 additions & 29 deletions 58 lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from numpy import ma

import matplotlib as mpl
import matplotlib.category # Register category unit converter as side-effect.
import matplotlib.category # Register category unit converter as side effect.
import matplotlib.cbook as cbook
import matplotlib.collections as mcoll
import matplotlib.colors as mcolors
import matplotlib.contour as mcontour
import matplotlib.dates # noqa # Register date unit converter as side-effect.
import matplotlib.dates # noqa # Register date unit converter as side effect.
import matplotlib.image as mimage
import matplotlib.legend as mlegend
import matplotlib.lines as mlines
Expand Down Expand Up @@ -541,7 +541,7 @@ def indicate_inset_zoom(self, inset_ax, **kwargs):
@_docstring.dedent_interpd
def secondary_xaxis(self, location, *, functions=None, **kwargs):
"""
Add a second x-axis to this Axes.
Add a second x-axis to this `~.axes.Axes`.

For example if we want to have a second scale for the data plotted on
the xaxis.
Expand Down Expand Up @@ -583,7 +583,7 @@ def invert(x):
@_docstring.dedent_interpd
def secondary_yaxis(self, location, *, functions=None, **kwargs):
"""
Add a second y-axis to this Axes.
Add a second y-axis to this `~.axes.Axes`.

For example if we want to have a second scale for the data plotted on
the yaxis.
Expand Down Expand Up @@ -721,8 +721,8 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
Other Parameters
----------------
**kwargs
Valid keyword arguments are `.Line2D` properties, with the
exception of 'transform':
Valid keyword arguments are `.Line2D` properties, except for
'transform':

%(Line2D:kwdoc)s

Expand Down Expand Up @@ -789,8 +789,8 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
Other Parameters
----------------
**kwargs
Valid keyword arguments are `.Line2D` properties, with the
exception of 'transform':
Valid keyword arguments are `.Line2D` properties, except for
'transform':

%(Line2D:kwdoc)s

Expand Down Expand Up @@ -1491,7 +1491,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
>>> plot(x1, y1, 'g^', x2, y2, 'g-')

In this case, any additional keyword argument applies to all
datasets. Also this syntax cannot be combined with the *data*
datasets. Also, this syntax cannot be combined with the *data*
parameter.

By default, each line is assigned a different style specified by a
Expand Down Expand Up @@ -1753,15 +1753,15 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
@_docstring.dedent_interpd
def loglog(self, *args, **kwargs):
"""
Make a plot with log scaling on both the x and y axis.
Make a plot with log scaling on both the x- and y-axis.

Call signatures::

loglog([x], y, [fmt], data=None, **kwargs)
loglog([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around `.plot` which additionally changes
both the x-axis and the y-axis to log scaling. All of the concepts and
both the x-axis and the y-axis to log scaling. All the concepts and
parameters of plot can be used here as well.

The additional parameters *base*, *subs* and *nonpositive* control the
Expand Down Expand Up @@ -1807,16 +1807,16 @@ def loglog(self, *args, **kwargs):
@_docstring.dedent_interpd
def semilogx(self, *args, **kwargs):
"""
Make a plot with log scaling on the x axis.
Make a plot with log scaling on the x-axis.

Call signatures::

semilogx([x], y, [fmt], data=None, **kwargs)
semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around `.plot` which additionally changes
the x-axis to log scaling. All of the concepts and parameters of plot
can be used here as well.
the x-axis to log scaling. All the concepts and parameters of plot can
be used here as well.

The additional parameters *base*, *subs*, and *nonpositive* control the
x-axis properties. They are just forwarded to `.Axes.set_xscale`.
Expand Down Expand Up @@ -1854,16 +1854,16 @@ def semilogx(self, *args, **kwargs):
@_docstring.dedent_interpd
def semilogy(self, *args, **kwargs):
"""
Make a plot with log scaling on the y axis.
Make a plot with log scaling on the y-axis.

Call signatures::

semilogy([x], y, [fmt], data=None, **kwargs)
semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around `.plot` which additionally changes
the y-axis to log scaling. All of the concepts and parameters of plot
can be used here as well.
the y-axis to log scaling. All the concepts and parameters of plot can
be used here as well.

The additional parameters *base*, *subs*, and *nonpositive* control the
y-axis properties. They are just forwarded to `.Axes.set_yscale`.
Expand Down Expand Up @@ -3121,7 +3121,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
For example, you can pass in ``wedgeprops = {'linewidth': 3}``
to set the width of the wedge border lines equal to 3.
For more details, look at the doc/arguments of the wedge object.
By default ``clip_on=False``.
By default, ``clip_on=False``.

textprops : dict, default: None
Dict of arguments to pass to the text objects.
Expand Down Expand Up @@ -3352,7 +3352,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
The format for the data points / data lines. See `.plot` for
details.

Use 'none' (case insensitive) to plot errorbars without any data
Use 'none' (case-insensitive) to plot errorbars without any data
markers.

ecolor : color, default: None
Expand Down Expand Up @@ -4387,7 +4387,7 @@ def invalid_shape_exception(csize, xsize):
c_is_mapped = False
if c.size != xsize:
valid_shape = False
# If c can be either mapped values or a RGB(A) color, prefer
# If c can be either mapped values or an RGB(A) color, prefer
# the former if shapes match, the latter otherwise.
elif c.size == xsize:
c = c.ravel()
Expand Down Expand Up @@ -4458,9 +4458,9 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
Note that *c* should not be a single numeric RGB or RGBA sequence
because that is indistinguishable from an array of values to be
colormapped. If you want to specify the same RGB or RGBA value for
all points, use a 2D array with a single row. Otherwise, value-
matching will have precedence in case of a size matching with *x*
and *y*.
all points, use a 2D array with a single row. Otherwise,
value-matching will have precedence in case of a size matching with
*x* and *y*.

If you wish to specify a single color for all points
prefer the *color* keyword argument.
Expand Down Expand Up @@ -5126,7 +5126,7 @@ def _quiver_units(self, args, kwargs):
return (x, y) + args[2:]
return args

# args can by a combination if X, Y, U, V, C and all should be replaced
# args can be a combination of X, Y, U, V, C and all should be replaced
@_preprocess_data()
@_docstring.dedent_interpd
def quiver(self, *args, **kwargs):
Expand Down Expand Up @@ -6566,7 +6566,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
equals 1.

bottom : array-like, scalar, or None, default: None
Location of the bottom of each bin, ie. bins are drawn from
Location of the bottom of each bin, i.e. bins are drawn from
``bottom`` to ``bottom + hist(x, bins)`` If a scalar, the bottom
of each bin is shifted by the same amount. If an array, each bin
is shifted independently and the length of bottom must match the
Expand Down Expand Up @@ -7060,9 +7060,9 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
histogrammed along the first dimension and values in y are
histogrammed along the second dimension.
xedges : 1D array
The bin edges along the x axis.
The bin edges along the x-axis.
yedges : 1D array
The bin edges along the y axis.
The bin edges along the y-axis.
image : `~.matplotlib.collections.QuadMesh`

Other Parameters
Expand Down Expand Up @@ -7653,7 +7653,7 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
scale : {'default', 'linear', 'dB'}
The scaling of the values in the *spec*. 'linear' is no scaling.
'dB' returns the values in dB scale. When *mode* is 'psd',
this is dB power (10 * log10). Otherwise this is dB amplitude
this is dB power (10 * log10). Otherwise, this is dB amplitude
(20 * log10). 'default' is 'dB' if *mode* is 'psd' or
'magnitude' and 'linear' otherwise. This must be 'linear'
if *mode* is 'angle' or 'phase'.
Expand Down Expand Up @@ -8240,7 +8240,7 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,

table = mtable.table

# args can by either Y or y1, y2, ... and all should be replaced
# args can be either Y or y1, y2, ... and all should be replaced
stackplot = _preprocess_data()(mstack.stackplot)

streamplot = _preprocess_data(
Expand Down
18 changes: 9 additions & 9 deletions 18 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class _axis_method_wrapper:

The docstring of ``get_foo`` is built by replacing "this Axis" by "the
{attr_name}" (i.e., "the xaxis", "the yaxis") in the wrapped method's
dedented docstring; additional replacements can by given in *doc_sub*.
dedented docstring; additional replacements can be given in *doc_sub*.
"""

def __init__(self, attr_name, method_name, *, doc_sub=None):
Expand Down Expand Up @@ -606,8 +606,8 @@ def __init__(self, fig,
`.SubplotSpec` instance.

sharex, sharey : `~.axes.Axes`, optional
The x or y `~.matplotlib.axis` is shared with the x or
y axis in the input `~.axes.Axes`.
The x- or y-`~.matplotlib.axis` is shared with the x- or y-axis in
the input `~.axes.Axes`.

frameon : bool, default: True
Whether the Axes frame is visible.
Expand Down Expand Up @@ -1093,7 +1093,7 @@ def get_position(self, original=False):
Parameters
----------
original : bool
If ``True``, return the original position. Otherwise return the
If ``True``, return the original position. Otherwise, return the
active position. For an explanation of the positions see
`.set_position`.

Expand Down Expand Up @@ -1422,7 +1422,7 @@ def __init__(self, axes, prop_name, add_name,
"""
Parameters
----------
axes : .axes.Axes
axes : `~matplotlib.axes.Axes`
The Axes from which this sublist will pull the children
Artists.
prop_name : str
Expand Down Expand Up @@ -1702,7 +1702,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):

anchor : None or str or (float, float), optional
If not ``None``, this defines where the Axes will be drawn if there
is extra space due to aspect constraints. The most common way to
is extra space due to aspect constraints. The most common way
to specify the anchor are abbreviations of cardinal directions:

===== =====================
Expand Down Expand Up @@ -2911,10 +2911,10 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True):
behaves like True).

scalex : bool, default: True
Whether to autoscale the x axis.
Whether to autoscale the x-axis.

scaley : bool, default: True
Whether to autoscale the y axis.
Whether to autoscale the y-axis.

Notes
-----
Expand Down Expand Up @@ -3997,7 +3997,7 @@ def format_xdata(self, x):

def format_ydata(self, y):
"""
Return *y* formatted as an y-value.
Return *y* formatted as a y-value.

This function will use the `.fmt_ydata` attribute if it is not None,
else will fall back on the yaxis major formatter.
Expand Down
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/backends/backend_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def restore_region(self, region, bbox=None, xy=None):

def start_filter(self):
"""
Start filtering. It simply create a new canvas (the old one is saved).
Start filtering. It simply creates a new canvas (the old one is saved).
"""
self._filter_renderers.append(self._renderer)
self._renderer = _RendererAgg(int(self.width), int(self.height),
Expand All @@ -344,7 +344,7 @@ def start_filter(self):

def stop_filter(self, post_processing):
"""
Save the plot in the current canvas as a image and apply
Save the plot in the current canvas as an image and apply
the *post_processing* function.

def post_processing(image, dpi):
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2614,7 +2614,7 @@ def clip_cmd(self, cliprect, clippath):
def delta(self, other):
"""
Copy properties of other into self and return PDF commands
needed to transform self into other.
needed to transform *self* into *other*.
"""
cmds = []
fill_performed = False
Expand Down
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/backends/backend_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def _print_figure(
Render the figure to a filesystem path or a file-like object.

Parameters are as for `.print_figure`, except that *dsc_comments* is a
all string containing Document Structuring Convention comments,
string containing Document Structuring Convention comments,
generated from the *metadata* parameter to `.print_figure`.
"""
is_eps = fmt == 'eps'
Expand Down Expand Up @@ -1187,7 +1187,7 @@ def gs_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
# the original bbox can be restored during the pstoeps step.

if eps:
# For some versions of gs, above steps result in an ps file where the
# For some versions of gs, above steps result in a ps file where the
# original bbox is no more correct. Do not adjust bbox for now.
pstoeps(tmpfile, bbox, rotated=rotated)

Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backends/backend_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class __getattr__:
def _create_qApp():
app = QtWidgets.QApplication.instance()

# Create a new QApplication and configure if if non exists yet, as only one
# QApplication can exist at a time.
# Create a new QApplication and configure it if none exists yet, as only
# one QApplication can exist at a time.
if app is None:
# display_is_valid returns False only if on Linux and neither X11
# nor Wayland display can be opened.
Expand Down Expand Up @@ -376,7 +376,7 @@ def _get_key(self, event):
except KeyError:
# Unicode defines code points up to 0x10ffff (sys.maxunicode)
# QT will use Key_Codes larger than that for keyboard keys that are
# are not Unicode characters (like multimedia keys)
# not Unicode characters (like multimedia keys)
# skip these
# if you really want them, you should add them to SPECIAL_KEYS
if event_key > sys.maxunicode:
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backends/backend_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
produced. This provides a starting point for backend writers; you can
selectively implement drawing methods (`~.RendererTemplate.draw_path`,
`~.RendererTemplate.draw_image`, etc.) and slowly see your figure come to life
instead having to have a full blown implementation before getting any results.
instead having to have a full-blown implementation before getting any results.

Copy this file to a directory outside of the Matplotlib source tree, somewhere
Copy this file to a directory outside the Matplotlib source tree, somewhere
where Python can import it (by adding the directory to your ``sys.path`` or by
packaging it as a normal Python package); if the backend is importable as
``import my.backend`` you can then select it using ::
Expand Down Expand Up @@ -122,7 +122,7 @@ class GraphicsContextTemplate(GraphicsContextBase):
do the mapping here, you'll need to override several of the setter
methods.

The base GraphicsContext stores colors as a RGB tuple on the unit
The base GraphicsContext stores colors as an RGB tuple on the unit
interval, e.g., (0.5, 0.0, 1.0). You may need to map this to colors
appropriate for your backend.
"""
Expand Down
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/backends/backend_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class GraphicsContextWx(GraphicsContextBase):
seems to be fairly heavy, so these objects are cached based on the
bitmap object that is passed in.

The base GraphicsContext stores colors as a RGB tuple on the unit
The base GraphicsContext stores colors as an RGB tuple on the unit
interval, e.g., (0.5, 0.0, 1.0). wxPython uses an int interval, but
since wxPython colour management is rather simple, I have not chosen
to implement a separate colour manager class.
Expand Down Expand Up @@ -398,7 +398,7 @@ def set_joinstyle(self, js):
self.unselect()

def get_wxcolour(self, color):
"""Convert a RGB(A) color to a wx.Colour."""
"""Convert an RGB(A) color to a wx.Colour."""
_log.debug("%s - get_wx_color()", type(self))
return wx.Colour(*[int(255 * x) for x in color])

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.