From 8cfb7d33e3ab37a00ccfb479700d779ac57c9596 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 21 Nov 2022 19:42:50 +0100 Subject: [PATCH] Backport PR #24521: Doc: improve spelling and grammar --- lib/mpl_toolkits/axes_grid1/anchored_artists.py | 10 +++++----- lib/mpl_toolkits/axes_grid1/axes_divider.py | 12 ++++++------ lib/mpl_toolkits/axes_grid1/axes_grid.py | 2 +- lib/mpl_toolkits/axes_grid1/axes_size.py | 4 ++-- lib/mpl_toolkits/axes_grid1/inset_locator.py | 4 ++-- lib/mpl_toolkits/axisartist/axisline_style.py | 2 +- lib/mpl_toolkits/axisartist/grid_finder.py | 2 +- lib/mpl_toolkits/mplot3d/art3d.py | 14 ++++++-------- lib/mpl_toolkits/mplot3d/axes3d.py | 7 +++---- 9 files changed, 27 insertions(+), 30 deletions(-) diff --git a/lib/mpl_toolkits/axes_grid1/anchored_artists.py b/lib/mpl_toolkits/axes_grid1/anchored_artists.py index 7e15879289ee..ac170fcc7376 100644 --- a/lib/mpl_toolkits/axes_grid1/anchored_artists.py +++ b/lib/mpl_toolkits/axes_grid1/anchored_artists.py @@ -30,7 +30,7 @@ def __init__(self, width, height, xdescent, ydescent, Location of this artist. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. pad : float, default: 0.4 @@ -88,7 +88,7 @@ def __init__(self, transform, loc, Location of this artist. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. pad : float, default: 0.4 @@ -144,7 +144,7 @@ def __init__(self, transform, width, height, angle, loc, Location of the ellipse. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. pad : float, default: 0.1 @@ -194,7 +194,7 @@ def __init__(self, transform, size, label, loc, Location of the size bar. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. pad : float, default: 0.1 @@ -314,7 +314,7 @@ def __init__(self, transform, label_x, label_y, length=0.15, Location of the arrow. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. angle : float, default: 0 diff --git a/lib/mpl_toolkits/axes_grid1/axes_divider.py b/lib/mpl_toolkits/axes_grid1/axes_divider.py index 251fa44b14bf..9a56b3e50488 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_divider.py +++ b/lib/mpl_toolkits/axes_grid1/axes_divider.py @@ -183,10 +183,10 @@ def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None): Parameters ---------- nx, nx1 : int - Integers specifying the column-position of the - cell. When *nx1* is None, a single *nx*-th column is - specified. Otherwise location of columns spanning between *nx* - to *nx1* (but excluding *nx1*-th column) is specified. + Integers specifying the column-position of the cell. When *nx1* is + None, a single *nx*-th column is specified. Otherwise, the + location of columns spanning between *nx* to *nx1* (but excluding + *nx1*-th column) is specified. ny, ny1 : int Same as *nx* and *nx1*, but for row positions. axes @@ -509,8 +509,8 @@ def append_axes(self, position, size, pad=None, add_to_figure=True, *, pad : :mod:`~mpl_toolkits.axes_grid1.axes_size` or float or str Padding between the axes. float or str arguments are interpreted as for *size*. Defaults to :rc:`figure.subplot.wspace` times the - main axes width (left or right axes) or :rc:`figure.subplot.hspace` - times the main axes height (bottom or top axes). + main Axes width (left or right axes) or :rc:`figure.subplot.hspace` + times the main Axes height (bottom or top axes). axes_class : subclass type of `~.axes.Axes`, optional The type of the new axes. Defaults to the type of the main axes. **kwargs diff --git a/lib/mpl_toolkits/axes_grid1/axes_grid.py b/lib/mpl_toolkits/axes_grid1/axes_grid.py index b2fe5d249609..9928a2d02b0c 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_grid.py +++ b/lib/mpl_toolkits/axes_grid1/axes_grid.py @@ -53,7 +53,7 @@ class Grid: """ A grid of Axes. - In Matplotlib, the axes location (and size) is specified in normalized + In Matplotlib, the Axes location (and size) is specified in normalized figure coordinates. This may not be ideal for images that needs to be displayed with a given aspect ratio; for example, it is difficult to display multiple images of a same size with some fixed padding between diff --git a/lib/mpl_toolkits/axes_grid1/axes_size.py b/lib/mpl_toolkits/axes_grid1/axes_size.py index d06681ef2cfd..cb800210fb79 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_size.py +++ b/lib/mpl_toolkits/axes_grid1/axes_size.py @@ -1,6 +1,6 @@ """ Provides classes of simple units that will be used with AxesDivider -class (or others) to determine the size of each axes. The unit +class (or others) to determine the size of each Axes. The unit classes define `get_size` method that returns a tuple of two floats, meaning relative and absolute sizes, respectively. @@ -207,7 +207,7 @@ def get_size(self, renderer): @_api.deprecated("3.6", alternative="size + pad") class Padded(_Base): """ - Return a instance where the absolute part of *size* is + Return an instance where the absolute part of *size* is increase by the amount of *pad*. """ diff --git a/lib/mpl_toolkits/axes_grid1/inset_locator.py b/lib/mpl_toolkits/axes_grid1/inset_locator.py index 01c14e9baa4a..7aaa7f909a9d 100644 --- a/lib/mpl_toolkits/axes_grid1/inset_locator.py +++ b/lib/mpl_toolkits/axes_grid1/inset_locator.py @@ -349,7 +349,7 @@ def inset_axes(parent_axes, width, height, loc='upper right', Location to place the inset axes. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. @@ -457,7 +457,7 @@ def zoomed_inset_axes(parent_axes, zoom, loc='upper right', Location to place the inset axes. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', - 'lower left', 'lower center, 'lower right'. + 'lower left', 'lower center', 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter *loc* of `.Legend` for details. diff --git a/lib/mpl_toolkits/axisartist/axisline_style.py b/lib/mpl_toolkits/axisartist/axisline_style.py index db4b0c144c5e..31c8a8ecf384 100644 --- a/lib/mpl_toolkits/axisartist/axisline_style.py +++ b/lib/mpl_toolkits/axisartist/axisline_style.py @@ -75,7 +75,7 @@ class AxislineStyle(_Style): """ A container class which defines style classes for AxisArtists. - An instance of any axisline style class is an callable object, + An instance of any axisline style class is a callable object, whose call signature is :: __call__(self, axis_artist, path, transform) diff --git a/lib/mpl_toolkits/axisartist/grid_finder.py b/lib/mpl_toolkits/axisartist/grid_finder.py index a8177b3bb0f0..4468eb65f3e7 100644 --- a/lib/mpl_toolkits/axisartist/grid_finder.py +++ b/lib/mpl_toolkits/axisartist/grid_finder.py @@ -130,7 +130,7 @@ def __init__(self, tick_formatter2=None): """ transform : transform from the image coordinate (which will be - the transData of the axes to the world coordinate. + the transData of the axes to the world coordinate). or transform = (transform_xy, inv_transform_xy) diff --git a/lib/mpl_toolkits/mplot3d/art3d.py b/lib/mpl_toolkits/mplot3d/art3d.py index 82c6d8bbf290..2176b58744d6 100644 --- a/lib/mpl_toolkits/mplot3d/art3d.py +++ b/lib/mpl_toolkits/mplot3d/art3d.py @@ -410,10 +410,9 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs): :class:`~matplotlib.collections.PatchCollection`. In addition, keywords *zs=0* and *zdir='z'* are available. - Also, the keyword argument *depthshade* is available to - indicate whether or not to shade the patches in order to - give the appearance of depth (default is *True*). - This is typically desired in scatter plots. + Also, the keyword argument *depthshade* is available to indicate + whether to shade the patches in order to give the appearance of depth + (default is *True*). This is typically desired in scatter plots. """ self._depthshade = depthshade super().__init__(*args, **kwargs) @@ -505,10 +504,9 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs): :class:`~matplotlib.collections.PathCollection`. In addition, keywords *zs=0* and *zdir='z'* are available. - Also, the keyword argument *depthshade* is available to - indicate whether or not to shade the patches in order to - give the appearance of depth (default is *True*). - This is typically desired in scatter plots. + Also, the keyword argument *depthshade* is available to indicate + whether to shade the patches in order to give the appearance of depth + (default is *True*). This is typically desired in scatter plots. """ self._depthshade = depthshade self._in_draw = False diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 3d793addc91e..73af916f6690 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -2249,7 +2249,7 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None, """ Generate a 3D barplot. - This method creates three dimensional barplot where the width, + This method creates three-dimensional barplot where the width, depth, height, and color of the bars can all be uniquely set. Parameters @@ -2302,8 +2302,7 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None, Returns ------- collection : `~.art3d.Poly3DCollection` - A collection of three dimensional polygons representing - the bars. + A collection of three-dimensional polygons representing the bars. """ had_data = self.has_data() @@ -2818,7 +2817,7 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='', 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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy