From 162bd59f50a9c59a51574aee5dc9e932133bb971 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 17 Jan 2022 00:48:14 +0100 Subject: [PATCH] DOC: More capitalization of Axes In line with #18726. Triggered by #22242. --- .../demo_colorbar_with_axes_divider.py | 4 +-- examples/axes_grid1/simple_axes_divider1.py | 2 +- examples/axes_grid1/simple_colorbar.py | 2 +- .../fill_between_alpha.py | 2 +- .../lines_bars_and_markers/gradient_bar.py | 2 +- examples/misc/logos2.py | 2 +- examples/spines/spines.py | 6 ++-- .../axes_box_aspect.py | 8 ++--- .../shared_axis_demo.py | 10 +++--- lib/matplotlib/_constrained_layout.py | 4 +-- lib/matplotlib/artist.py | 4 +-- lib/matplotlib/backend_bases.py | 4 +-- lib/matplotlib/figure.py | 4 +-- lib/matplotlib/projections/polar.py | 2 +- lib/matplotlib/pyplot.py | 32 +++++++++---------- lib/matplotlib/tests/test_axes.py | 6 ++-- .../tests/test_constrainedlayout.py | 2 +- lib/matplotlib/tests/test_patches.py | 2 +- lib/matplotlib/tests/test_pyplot.py | 4 +-- lib/matplotlib/tests/test_widgets.py | 2 +- lib/matplotlib/transforms.py | 2 +- lib/matplotlib/tri/tricontour.py | 2 +- lib/matplotlib/widgets.py | 6 ++-- .../axes_grid1/anchored_artists.py | 2 +- lib/mpl_toolkits/mplot3d/axes3d.py | 2 +- tutorials/advanced/transforms_tutorial.py | 4 +-- .../intermediate/constrainedlayout_guide.py | 2 +- tutorials/intermediate/tight_layout_guide.py | 2 +- tutorials/introductory/pyplot.py | 4 +-- tutorials/text/annotations.py | 2 +- tutorials/toolkits/axes_grid.py | 4 +-- tutorials/toolkits/axisartist.py | 4 +-- 32 files changed, 70 insertions(+), 70 deletions(-) diff --git a/examples/axes_grid1/demo_colorbar_with_axes_divider.py b/examples/axes_grid1/demo_colorbar_with_axes_divider.py index 9ab4640ee8b0..920db5703b98 100644 --- a/examples/axes_grid1/demo_colorbar_with_axes_divider.py +++ b/examples/axes_grid1/demo_colorbar_with_axes_divider.py @@ -18,13 +18,13 @@ im1 = ax1.imshow([[1, 2], [3, 4]]) ax1_divider = make_axes_locatable(ax1) -# Add an axes to the right of the main axes. +# Add an Axes to the right of the main Axes. cax1 = ax1_divider.append_axes("right", size="7%", pad="2%") cb1 = fig.colorbar(im1, cax=cax1) im2 = ax2.imshow([[1, 2], [3, 4]]) ax2_divider = make_axes_locatable(ax2) -# Add an axes above the main axes. +# Add an Axes above the main Axes. cax2 = ax2_divider.append_axes("top", size="7%", pad="2%") cb2 = fig.colorbar(im2, cax=cax2, orientation="horizontal") # Change tick position to top (with the default tick position "bottom", ticks diff --git a/examples/axes_grid1/simple_axes_divider1.py b/examples/axes_grid1/simple_axes_divider1.py index 9d96f2a3bcd5..0ead9c27ae9f 100644 --- a/examples/axes_grid1/simple_axes_divider1.py +++ b/examples/axes_grid1/simple_axes_divider1.py @@ -11,7 +11,7 @@ def label_axes(ax, text): - """Place a label at the center of an axes, and remove the axis ticks.""" + """Place a label at the center of an Axes, and remove the axis ticks.""" ax.text(.5, .5, text, transform=ax.transAxes, horizontalalignment="center", verticalalignment="center") ax.tick_params(bottom=False, labelbottom=False, diff --git a/examples/axes_grid1/simple_colorbar.py b/examples/axes_grid1/simple_colorbar.py index d7ca58046a53..41a34eefcab1 100644 --- a/examples/axes_grid1/simple_colorbar.py +++ b/examples/axes_grid1/simple_colorbar.py @@ -11,7 +11,7 @@ ax = plt.subplot() im = ax.imshow(np.arange(100).reshape((10, 10))) -# create an axes on the right side of ax. The width of cax will be 5% +# create an Axes on the right side of ax. The width of cax will be 5% # of ax and the padding between cax and ax will be fixed at 0.05 inch. divider = make_axes_locatable(ax) cax = divider.append_axes("right", size="5%", pad=0.05) diff --git a/examples/lines_bars_and_markers/fill_between_alpha.py b/examples/lines_bars_and_markers/fill_between_alpha.py index 30e7f6be3dcd..2f434f7d6901 100644 --- a/examples/lines_bars_and_markers/fill_between_alpha.py +++ b/examples/lines_bars_and_markers/fill_between_alpha.py @@ -133,7 +133,7 @@ ############################################################################### # Another handy use of filled regions is to highlight horizontal or vertical -# spans of an axes -- for that Matplotlib has the helper functions +# spans of an Axes -- for that Matplotlib has the helper functions # `~matplotlib.axes.Axes.axhspan` and `~matplotlib.axes.Axes.axvspan`. See # :doc:`/gallery/subplots_axes_and_figures/axhspan_demo`. diff --git a/examples/lines_bars_and_markers/gradient_bar.py b/examples/lines_bars_and_markers/gradient_bar.py index 2441f4d00744..9fbe574b17a9 100644 --- a/examples/lines_bars_and_markers/gradient_bar.py +++ b/examples/lines_bars_and_markers/gradient_bar.py @@ -12,7 +12,7 @@ by a unit vector *v*. The values at the corners are then obtained by the lengths of the projections of the corner vectors on *v*. -A similar approach can be used to create a gradient background for an axes. +A similar approach can be used to create a gradient background for an Axes. In that case, it is helpful to uses Axes coordinates (``extent=(0, 1, 0, 1), transform=ax.transAxes``) to be independent of the data coordinates. diff --git a/examples/misc/logos2.py b/examples/misc/logos2.py index 528f09e92c18..06e3b5d65e7a 100644 --- a/examples/misc/logos2.py +++ b/examples/misc/logos2.py @@ -89,7 +89,7 @@ def create_icon_axes(fig, ax_position, lw_bars, lw_grid, lw_border, rgrid): def create_text_axes(fig, height_px): - """Create an axes in *fig* that contains 'matplotlib' as Text.""" + """Create an Axes in *fig* that contains 'matplotlib' as Text.""" ax = fig.add_axes((0, 0, 1, 1)) ax.set_aspect("equal") ax.set_axis_off() diff --git a/examples/spines/spines.py b/examples/spines/spines.py index 08e3700d1387..eff641c32325 100644 --- a/examples/spines/spines.py +++ b/examples/spines/spines.py @@ -5,9 +5,9 @@ This demo compares: -- normal axes, with spines on all four sides; -- an axes with spines only on the left and bottom; -- an axes using custom bounds to limit the extent of the spine. +- normal Axes, with spines on all four sides; +- an Axes with spines only on the left and bottom; +- an Axes using custom bounds to limit the extent of the spine. """ import numpy as np import matplotlib.pyplot as plt diff --git a/examples/subplots_axes_and_figures/axes_box_aspect.py b/examples/subplots_axes_and_figures/axes_box_aspect.py index 4444f0f28366..019c7e43c787 100644 --- a/examples/subplots_axes_and_figures/axes_box_aspect.py +++ b/examples/subplots_axes_and_figures/axes_box_aspect.py @@ -3,7 +3,7 @@ Axes box aspect =============== -This demo shows how to set the aspect of an axes box directly via +This demo shows how to set the aspect of an Axes box directly via `~.Axes.set_box_aspect`. The box aspect is the ratio between axes height and axes width in physical units, independent of the data limits. This is useful to e.g. produce a square plot, independent of the data it @@ -119,7 +119,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # # When setting the box aspect, one may still set the data aspect as well. -# Here we create an axes with a box twice as long as tall and use an "equal" +# Here we create an Axes with a box twice as long as tall and use an "equal" # data aspect for its contents, i.e. the circle actually stays circular. fig6, ax = plt.subplots() @@ -135,8 +135,8 @@ # Box aspect for many subplots # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# It is possible to pass the box aspect to an axes at initialization. The -# following creates a 2 by 3 subplot grid with all square axes. +# It is possible to pass the box aspect to an Axes at initialization. The +# following creates a 2 by 3 subplot grid with all square Axes. fig7, axs = plt.subplots(2, 3, subplot_kw=dict(box_aspect=1), sharex=True, sharey=True, constrained_layout=True) diff --git a/examples/subplots_axes_and_figures/shared_axis_demo.py b/examples/subplots_axes_and_figures/shared_axis_demo.py index e475a3307288..55c2819cebcf 100644 --- a/examples/subplots_axes_and_figures/shared_axis_demo.py +++ b/examples/subplots_axes_and_figures/shared_axis_demo.py @@ -4,14 +4,14 @@ =========== You can share the x or y axis limits for one axis with another by -passing an axes instance as a *sharex* or *sharey* keyword argument. +passing an `~.axes.Axes` instance as a *sharex* or *sharey* keyword argument. Changing the axis limits on one axes will be reflected automatically in the other, and vice-versa, so when you navigate with the toolbar -the axes will follow each other on their shared axes. Ditto for +the Axes will follow each other on their shared axis. Ditto for changes in the axis scaling (e.g., log vs. linear). However, it is possible to have differences in tick labeling, e.g., you can selectively -turn off the tick labels on one axes. +turn off the tick labels on one Axes. The example below shows how to customize the tick labels on the various axes. Shared axes share the tick locator, tick formatter, @@ -20,13 +20,13 @@ because you may want to make the tick labels smaller on the upper axes, e.g., in the example below. -If you want to turn off the ticklabels for a given axes (e.g., on +If you want to turn off the ticklabels for a given Axes (e.g., on subplot(211) or subplot(212), you cannot do the standard trick:: setp(ax2, xticklabels=[]) because this changes the tick Formatter, which is shared among all -axes. But you can alter the visibility of the labels, which is a +Axes. But you can alter the visibility of the labels, which is a property:: setp(ax2.get_xticklabels(), visible=False) diff --git a/lib/matplotlib/_constrained_layout.py b/lib/matplotlib/_constrained_layout.py index 7743ca809c52..dfe9e037aa10 100644 --- a/lib/matplotlib/_constrained_layout.py +++ b/lib/matplotlib/_constrained_layout.py @@ -34,8 +34,8 @@ often just set to 1 for an equal grid. Subplotspecs that are derived from this gridspec can contain either a -``SubPanel``, a ``GridSpecFromSubplotSpec``, or an axes. The ``SubPanel`` and -``GridSpecFromSubplotSpec`` are dealt with recursively and each contain an +``SubPanel``, a ``GridSpecFromSubplotSpec``, or an ``Axes``. The ``SubPanel`` +and ``GridSpecFromSubplotSpec`` are dealt with recursively and each contain an analogous layout. Each ``GridSpec`` has a ``_layoutgrid`` attached to it. The ``_layoutgrid`` diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py index a0888fa4ddda..06f418cf7404 100644 --- a/lib/matplotlib/artist.py +++ b/lib/matplotlib/artist.py @@ -185,7 +185,7 @@ def __init__(self): def __getstate__(self): d = self.__dict__.copy() # remove the unpicklable remove method, this will get re-added on load - # (by the axes) if the artist lives on an axes. + # (by the Axes) if the artist lives on an Axes. d['stale_callback'] = None return d @@ -516,7 +516,7 @@ def pick(self, mouseevent): if (mouseevent.inaxes is None or ax is None or mouseevent.inaxes == ax): # we need to check if mouseevent.inaxes is None - # because some objects associated with an axes (e.g., a + # because some objects associated with an Axes (e.g., a # tick label) can be outside the bounding box of the # axes and inaxes will be None # also check that ax is None so that it traverse objects diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 99b7f7a17586..173558b534ac 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -2491,7 +2491,7 @@ def key_press_handler(event, canvas=None, toolbar=None): back-compatibility, but, if set, should always be equal to ``event.canvas.toolbar``. """ - # these bindings happen whether you are over an axes or not + # these bindings happen whether you are over an Axes or not if event.key is None: return @@ -2554,7 +2554,7 @@ def key_press_handler(event, canvas=None, toolbar=None): if event.inaxes is None: return - # these bindings require the mouse to be over an axes to trigger + # these bindings require the mouse to be over an Axes to trigger def _get_uniform_gridstate(ticks): # Return True/False if all grid lines are on or off, None if they are # not all in the same state. diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 7757eb61dd0b..2780599cc5c9 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -188,7 +188,7 @@ class FigureBase(Artist): def __init__(self, **kwargs): super().__init__() # remove the non-figure artist _axes property - # as it makes no sense for a figure to be _in_ an axes + # as it makes no sense for a figure to be _in_ an Axes # this is used by the property methods in the artist base class # which are over-ridden in this class del self._axes @@ -1879,7 +1879,7 @@ def _do_layout(gs, mosaic, unique_ids, nested): name, arg, method = this_level[key] # we are doing some hokey function dispatch here based # on the 'method' string stashed above to sort out if this - # element is an axes or a nested mosaic. + # element is an Axes or a nested mosaic. if method == 'axes': slc = arg # add a single axes diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.py index a074fd8b0ee8..41e2d985e73e 100644 --- a/lib/matplotlib/projections/polar.py +++ b/lib/matplotlib/projections/polar.py @@ -1024,7 +1024,7 @@ def set_thetalim(self, *args, **kwargs): where minval and maxval are the minimum and maximum limits. Values are wrapped in to the range :math:`[0, 2\pi]` (in radians), so for example it is possible to do ``set_thetalim(-np.pi / 2, np.pi / 2)`` to have - an axes symmetric around 0. A ValueError is raised if the absolute + an axis symmetric around 0. A ValueError is raised if the absolute angle difference is larger than a full circle. """ orig_lim = self.get_xlim() # in radians diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index d604b5d15a42..f7a8dd2b2313 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -20,7 +20,7 @@ pyplot is still usually used to create the figure and often the axes in the figure. See `.pyplot.figure`, `.pyplot.subplots`, and `.pyplot.subplot_mosaic` to create figures, and -:doc:`Axes API <../axes_api>` for the plotting methods on an axes:: +:doc:`Axes API <../axes_api>` for the plotting methods on an Axes:: import numpy as np import matplotlib.pyplot as plt @@ -979,7 +979,7 @@ def figlegend(*args, **kwargs): @docstring.dedent_interpd def axes(arg=None, **kwargs): """ - Add an axes to the current figure and make it the current axes. + Add an Axes to the current figure and make it the current Axes. Call signatures:: @@ -992,10 +992,10 @@ def axes(arg=None, **kwargs): arg : None or 4-tuple The exact behavior of this function depends on the type: - - *None*: A new full window axes is added using + - *None*: A new full window Axes is added using ``subplot(**kwargs)``. - 4-tuple of floats *rect* = ``[left, bottom, width, height]``. - A new axes is added with dimensions *rect* in normalized + A new Axes is added with dimensions *rect* in normalized (0, 1) units using `~.Figure.add_axes` on the current figure. projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \ @@ -1010,10 +1010,10 @@ def axes(arg=None, **kwargs): sharex, sharey : `~.axes.Axes`, optional Share the x or y `~matplotlib.axis` with sharex and/or sharey. The axis will have the same limits, ticks, and scale as the axis - of the shared axes. + of the shared Axes. label : str - A label for the returned axes. + A label for the returned Axes. Returns ------- @@ -1026,23 +1026,23 @@ def axes(arg=None, **kwargs): ---------------- **kwargs This method also takes the keyword arguments for - the returned axes class. The keyword arguments for the - rectilinear axes class `~.axes.Axes` can be found in + the returned Axes class. The keyword arguments for the + rectilinear Axes class `~.axes.Axes` can be found in the following table but there might also be other keyword - arguments if another projection is used, see the actual axes + arguments if another projection is used, see the actual Axes class. %(Axes:kwdoc)s Notes ----- - If the figure already has a axes with key (*args*, + If the figure already has an Axes with key (*args*, *kwargs*) then it will simply make that axes current and return it. This behavior is deprecated. Meanwhile, if you do not want this behavior (i.e., you want to force the creation of a - new axes), you must use a unique set of args and kwargs. The axes + new axes), you must use a unique set of args and kwargs. The Axes *label* attribute has been exposed for this purpose: if you want - two axes that are otherwise identical to be added to the figure, + two Axes that are otherwise identical to be added to the figure, make sure you give them unique labels. See Also @@ -1057,11 +1057,11 @@ def axes(arg=None, **kwargs): -------- :: - # Creating a new full window axes + # Creating a new full window Axes plt.axes() - # Creating a new axes with specified dimensions and some kwargs - plt.axes((left, bottom, width, height), facecolor='w') + # Creating a new Axes with specified dimensions and a grey background + plt.axes((left, bottom, width, height), facecolor='grey') """ fig = gcf() pos = kwargs.pop('position', None) @@ -1273,7 +1273,7 @@ def subplot(*args, **kwargs): key = SubplotSpec._from_subplot_args(fig, args) for ax in fig.axes: - # if we found an axes at the position sort out if we can re-use it + # if we found an Axes at the position sort out if we can re-use it if hasattr(ax, 'get_subplotspec') and ax.get_subplotspec() == key: # if the user passed no kwargs, re-use if kwargs == {}: diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index b7eb85b2cc8e..f9fe4f4d9037 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -529,8 +529,8 @@ def test_use_sticky_edges(): @check_figures_equal(extensions=["png"]) def test_sticky_shared_axes(fig_test, fig_ref): - # Check that sticky edges work whether they are set in an axes that is a - # "leader" in a share, or an axes that is a "follower". + # Check that sticky edges work whether they are set in an Axes that is a + # "leader" in a share, or an Axes that is a "follower". Z = np.arange(15).reshape(3, 5) ax0 = fig_test.add_subplot(211) @@ -6151,7 +6151,7 @@ def test_title_above_offset(left, center): def test_title_no_move_off_page(): - # If an axes is off the figure (ie. if it is cropped during a save) + # If an Axes is off the figure (ie. if it is cropped during a save) # make sure that the automatic title repositioning does not get done. mpl.rcParams['axes.titley'] = None fig = plt.figure() diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py index 255102bc102a..13b6f6c70917 100644 --- a/lib/matplotlib/tests/test_constrainedlayout.py +++ b/lib/matplotlib/tests/test_constrainedlayout.py @@ -423,7 +423,7 @@ def test_colorbar_location(): def test_hidden_axes(): - # test that if we make an axes not visible that constrained_layout + # test that if we make an Axes not visible that constrained_layout # still works. Note the axes still takes space in the layout # (as does a gridspec slot that is empty) fig, axs = plt.subplots(2, 2, layout="constrained") diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py index 6a8ddc87f3ae..ca4c64cd3806 100644 --- a/lib/matplotlib/tests/test_patches.py +++ b/lib/matplotlib/tests/test_patches.py @@ -138,7 +138,7 @@ def test_rotate_rect_draw(fig_test, fig_ref): ax_ref.add_patch(rect_ref) assert rect_ref.get_angle() == angle - # Check that when the angle is updated after adding to an axes, that the + # Check that when the angle is updated after adding to an Axes, that the # patch is marked stale and redrawn in the correct location rect_test = Rectangle(loc, width, height) assert rect_test.get_angle() == 0 diff --git a/lib/matplotlib/tests/test_pyplot.py b/lib/matplotlib/tests/test_pyplot.py index 0105c6f22d47..718e64755476 100644 --- a/lib/matplotlib/tests/test_pyplot.py +++ b/lib/matplotlib/tests/test_pyplot.py @@ -254,7 +254,7 @@ def test_gca_kwargs(): assert ax1.name == 'polar' plt.close() - # plt.gca() ignores keyword arguments if an axes already exists. + # plt.gca() ignores keyword arguments if an Axes already exists. plt.figure() ax = plt.gca() with pytest.warns( @@ -268,7 +268,7 @@ def test_gca_kwargs(): def test_subplot_projection_reuse(): - # create an axes + # create an Axes ax1 = plt.subplot(111) # check that it is current assert ax1 is plt.gca() diff --git a/lib/matplotlib/tests/test_widgets.py b/lib/matplotlib/tests/test_widgets.py index 3e77136d027d..0ca386af3322 100644 --- a/lib/matplotlib/tests/test_widgets.py +++ b/lib/matplotlib/tests/test_widgets.py @@ -1426,7 +1426,7 @@ def test_MultiCursor(horizOn, vertOn): for l in multi.hlines: assert l.get_ydata() == (.25, .25) - # test a move event in an axes not part of the MultiCursor + # test a move event in an Axes not part of the MultiCursor # the lines in ax1 and ax2 should not have moved. event = mock_event(ax3, xdata=.75, ydata=.75) multi.onmove(event) diff --git a/lib/matplotlib/transforms.py b/lib/matplotlib/transforms.py index 4752ff6e255b..beb614617e8c 100644 --- a/lib/matplotlib/transforms.py +++ b/lib/matplotlib/transforms.py @@ -1411,7 +1411,7 @@ def contains_branch_seperately(self, other_transform): each separate dimension. A common use for this method is to identify if a transform is a blended - transform containing an axes' data transform. e.g.:: + transform containing an Axes' data transform. e.g.:: x_isdata, y_isdata = trans.contains_branch_seperately(ax.transData) diff --git a/lib/matplotlib/tri/tricontour.py b/lib/matplotlib/tri/tricontour.py index dd7e569e641f..069e1462a148 100644 --- a/lib/matplotlib/tri/tricontour.py +++ b/lib/matplotlib/tri/tricontour.py @@ -22,7 +22,7 @@ def __init__(self, ax, *args, **kwargs): depending on whether keyword arg 'filled' is False (default) or True. - The first argument of the initializer must be an axes + The first argument of the initializer must be an `~.axes.Axes` object. The remaining arguments and keyword arguments are described in the docstring of `~.Axes.tricontour`. """ diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 5b50036fabbf..f9eb30f9cf8e 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -2848,7 +2848,7 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent) '__ARTIST_NAME__', 'rectangle')) class RectangleSelector(_SelectorWidget): """ - Select a rectangular region of an axes. + Select a rectangular region of an Axes. For the cursor to remain responsive you must keep a reference to it. @@ -3408,7 +3408,7 @@ def geometry(self): '__ARTIST_NAME__', 'ellipse')) class EllipseSelector(RectangleSelector): """ - Select an elliptical region of an axes. + Select an elliptical region of an Axes. For the cursor to remain responsive you must keep a reference to it. @@ -3546,7 +3546,7 @@ def _onmove(self, event): class PolygonSelector(_SelectorWidget): """ - Select a polygon region of an axes. + Select a polygon region of an Axes. Place vertices with each mouse click, and make the selection by completing the polygon (clicking on the first vertex). Once drawn individual vertices diff --git a/lib/mpl_toolkits/axes_grid1/anchored_artists.py b/lib/mpl_toolkits/axes_grid1/anchored_artists.py index 3f10d439d520..a3f59a2ef2ee 100644 --- a/lib/mpl_toolkits/axes_grid1/anchored_artists.py +++ b/lib/mpl_toolkits/axes_grid1/anchored_artists.py @@ -52,7 +52,7 @@ def __init__(self, width, height, xdescent, ydescent, Examples -------- To display blue and red circles of different sizes in the upper right - of an axes *ax*: + of an Axes *ax*: >>> ada = AnchoredDrawingArea(20, 20, 0, 0, ... loc='upper right', frameon=False) diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 1fcbdedea174..94e59743977c 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -191,7 +191,7 @@ def set_axis_on(self): def convert_zunits(self, z): """ - For artists in an axes, if the zaxis has units support, + For artists in an Axes, if the zaxis has units support, convert *z* using zaxis unit type """ return self.zaxis.convert_units(z) diff --git a/tutorials/advanced/transforms_tutorial.py b/tutorials/advanced/transforms_tutorial.py index 3fe230f3fd6a..b25756c97f2a 100644 --- a/tutorials/advanced/transforms_tutorial.py +++ b/tutorials/advanced/transforms_tutorial.py @@ -73,9 +73,9 @@ location if the ``dpi`` of the figure changes. This can cause confusion when printing or changing screen resolution, because the object can change location and size. Therefore it is most common -for artists placed in an axes or figure to have their transform set to +for artists placed in an Axes or figure to have their transform set to something *other* than the `~.transforms.IdentityTransform()`; the default when -an artist is placed on an axes using `~.axes.Axes.add_artist` is for the +an artist is placed on an Axes using `~.axes.Axes.add_artist` is for the transform to be ``ax.transData``. .. _data-coords: diff --git a/tutorials/intermediate/constrainedlayout_guide.py b/tutorials/intermediate/constrainedlayout_guide.py index 44def35d8d77..80864420298a 100644 --- a/tutorials/intermediate/constrainedlayout_guide.py +++ b/tutorials/intermediate/constrainedlayout_guide.py @@ -421,7 +421,7 @@ def docomplicated(suptitle=None): # Manually setting axes positions # ================================ # -# There can be good reasons to manually set an axes position. A manual call +# There can be good reasons to manually set an Axes position. A manual call # to `~.axes.Axes.set_position` will set the axes so constrained_layout has # no effect on it anymore. (Note that ``constrained_layout`` still leaves the # space for the axes that is moved). diff --git a/tutorials/intermediate/tight_layout_guide.py b/tutorials/intermediate/tight_layout_guide.py index 976fd511a516..e36fd05822c2 100644 --- a/tutorials/intermediate/tight_layout_guide.py +++ b/tutorials/intermediate/tight_layout_guide.py @@ -276,7 +276,7 @@ def example_plot(ax, fontsize=12): ############################################################################### # Another option is to use the AxesGrid1 toolkit to -# explicitly create an axes for the colorbar. +# explicitly create an Axes for the colorbar. from mpl_toolkits.axes_grid1 import make_axes_locatable diff --git a/tutorials/introductory/pyplot.py b/tutorials/introductory/pyplot.py index 8312cbf9bac2..6e858667c746 100644 --- a/tutorials/introductory/pyplot.py +++ b/tutorials/introductory/pyplot.py @@ -260,7 +260,7 @@ def f(t): ############################################################################### # The `~.pyplot.figure` call here is optional because a figure will be created -# if none exists, just as an axes will be created (equivalent to an explicit +# if none exists, just as an Axes will be created (equivalent to an explicit # ``subplot()`` call) if none exists. # The `~.pyplot.subplot` call specifies ``numrows, # numcols, plot_number`` where ``plot_number`` ranges from 1 to @@ -269,7 +269,7 @@ def f(t): # to ``subplot(2, 1, 1)``. # # You can create an arbitrary number of subplots -# and axes. If you want to place an axes manually, i.e., not on a +# and axes. If you want to place an Axes manually, i.e., not on a # rectangular grid, use `~.pyplot.axes`, # which allows you to specify the location as ``axes([left, bottom, # width, height])`` where all values are in fractional (0 to 1) diff --git a/tutorials/text/annotations.py b/tutorials/text/annotations.py index fb8bfd996542..3bb41b8565f1 100644 --- a/tutorials/text/annotations.py +++ b/tutorials/text/annotations.py @@ -160,7 +160,7 @@ # Annotating with Arrow # ~~~~~~~~~~~~~~~~~~~~~ # -# `~.Axes.annotate` draws an arrow connecting two points in an axes:: +# `~.Axes.annotate` draws an arrow connecting two points in an Axes:: # # ax.annotate("Annotation", # xy=(x1, y1), xycoords='data', diff --git a/tutorials/toolkits/axes_grid.py b/tutorials/toolkits/axes_grid.py index 97c09c22a60c..e040bad0fcd7 100644 --- a/tutorials/toolkits/axes_grid.py +++ b/tutorials/toolkits/axes_grid.py @@ -68,7 +68,7 @@ Users typically do not need to directly instantiate dividers by calling `~.axes_grid1.axes_divider.AxesDivider`; instead, `~.axes_grid1.axes_divider.make_axes_locatable` can be used to create a divider -for an axes:: +for an Axes:: ax = subplot(1, 1, 1) divider = make_axes_locatable(ax) @@ -119,7 +119,7 @@ ParasiteAxes ------------ -The ParasiteAxes is an axes whose location is identical to its host +The ParasiteAxes is an Axes whose location is identical to its host axes. The location is adjusted in the drawing time, thus it works even if the host change its location (e.g., images). diff --git a/tutorials/toolkits/axisartist.py b/tutorials/toolkits/axisartist.py index 7040a2f6a4d5..2e539cc3f20c 100644 --- a/tutorials/toolkits/axisartist.py +++ b/tutorials/toolkits/axisartist.py @@ -45,7 +45,7 @@ callable method and it behaves as an original Axes.axis method in Matplotlib). -To create an axes, :: +To create an Axes, :: import mpl_toolkits.axisartist as AA fig = plt.figure() @@ -84,7 +84,7 @@ ---------------------------- Most commands in the axes_grid1 toolkit can take an axes_class keyword -argument, and the commands create an axes of the given class. For example, +argument, and the commands create an Axes of the given class. For example, to create a host subplot with axisartist.Axes, :: import mpl_toolkits.axisartist as AA