diff --git a/doc/api/prev_api_changes/api_changes_2.1.0.rst b/doc/api/prev_api_changes/api_changes_2.1.0.rst index 90f9e00eecd1..9673d24c719f 100644 --- a/doc/api/prev_api_changes/api_changes_2.1.0.rst +++ b/doc/api/prev_api_changes/api_changes_2.1.0.rst @@ -20,7 +20,7 @@ Previously they were clipped to a very small number and shown. Matplotlib uses instances of :obj:`~matplotlib.cbook.CallbackRegistry` as a bridge between user input event from the GUI and user callbacks. Previously, any exceptions raised in a user call back would bubble out -of of the ``process`` method, which is typically in the GUI event +of the ``process`` method, which is typically in the GUI event loop. Most GUI frameworks simple print the traceback to the screen and continue as there is not always a clear method of getting the exception back to the user. However PyQt5 now exits the process when diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst index 2b21794ede6b..65807a184fbc 100644 --- a/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst +++ b/doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst @@ -262,7 +262,7 @@ most common operations remain available), and the list-of-one `.Polygon` is returned as is. This makes the `repr` of the returned artist more accurate: it is now :: - # "bar", "barstacked" + # "bar", "barstacked" [] # "step", "stepfilled" instead of :: diff --git a/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst index 85017d6b2c2b..c8733a2551ad 100644 --- a/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst +++ b/doc/api/prev_api_changes/api_changes_3.3.0/deprecations.rst @@ -72,7 +72,7 @@ Revert deprecation \*min, \*max keyword arguments to ``set_x/y/zlim_3d()`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These keyword arguments were deprecated in 3.0, alongside with the respective parameters in ``set_xlim()`` / ``set_ylim()``. The deprecations of the 2D -versions were already reverted in in 3.1. +versions were already reverted in 3.1. ``cbook.local_over_kwdict`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/devel/MEP/MEP22.rst b/doc/devel/MEP/MEP22.rst index d7e93bb5744d..d7cb770429c7 100644 --- a/doc/devel/MEP/MEP22.rst +++ b/doc/devel/MEP/MEP22.rst @@ -144,7 +144,7 @@ Defines the following attributes * messagelock: Lock to know if the message is available to write Public methods for **User use**: - * nav_connect(self, s, func): Connect to to navigation for events + * nav_connect(self, s, func): Connect to navigation for events * nav_disconnect(self, cid): Disconnect from navigation event * message_event(self, message, sender=None): Emit a tool_message_event event diff --git a/doc/users/prev_whats_new/changelog.rst b/doc/users/prev_whats_new/changelog.rst index e35878e9935e..ae9d40680e7c 100644 --- a/doc/users/prev_whats_new/changelog.rst +++ b/doc/users/prev_whats_new/changelog.rst @@ -2267,7 +2267,7 @@ the `API changes <../../api/api_changes.html>`_. Much of the drawing has been refactored in terms of compound paths. Therefore, many methods have been removed - from the backend interface and replaced with a a handful to + from the backend interface and replaced with a handful to draw compound paths. This will make updating the backends easier, since there is less to update. It also should make the backends more consistent in terms of functionality. diff --git a/doc/users/prev_whats_new/github_stats_3.4.0.rst b/doc/users/prev_whats_new/github_stats_3.4.0.rst index a9c62990714d..eeb53d647957 100644 --- a/doc/users/prev_whats_new/github_stats_3.4.0.rst +++ b/doc/users/prev_whats_new/github_stats_3.4.0.rst @@ -244,9 +244,9 @@ Pull Requests (772): * :ghpull:`19611`: Fix double picks. * :ghpull:`19640`: Backport PR #19639 on branch v3.4.x (FIX: do not allow single element list of str in subplot_mosaic) * :ghpull:`19639`: FIX: do not allow single element list of str in subplot_mosaic -* :ghpull:`19638`: Backport PR #19632 on branch v3.4.x (Fix handling of warn keyword in in Figure.show.) +* :ghpull:`19638`: Backport PR #19632 on branch v3.4.x (Fix handling of warn keyword in Figure.show.) * :ghpull:`19637`: Backport PR #19582 on branch v3.4.x (Add kerning to single-byte strings in PDFs) -* :ghpull:`19632`: Fix handling of warn keyword in in Figure.show. +* :ghpull:`19632`: Fix handling of warn keyword in Figure.show. * :ghpull:`19582`: Add kerning to single-byte strings in PDFs * :ghpull:`19629`: Backport PR #19548 on branch v3.4.x (Increase tolerances for other arches.) * :ghpull:`19630`: Backport PR #19596 on branch v3.4.x (Fix for issue 17769: wx interactive figure close cause crash) @@ -1016,7 +1016,7 @@ Issues (204): * :ghissue:`18648`: Drop support for directly imread()ing urls. * :ghissue:`19366`: Current CI doc builds fail * :ghissue:`19372`: matplotlib.axes.Axes.indicate_inset default label value is incompatible with LaTeX -* :ghissue:`17100`: Is it a better solution to acess one of the spines by class atrribute? +* :ghissue:`17100`: Is it a better solution to access one of the spines by class attribute? * :ghissue:`17375`: Proposal: add_subfigs.... * :ghissue:`19339`: constrained_layout + fixed-aspect axes + bbox_inches="tight" * :ghissue:`19308`: Reduce whitespace in Choosing Colormaps tutorial plots diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index 97e4f81fd306..db4ff42ffb1b 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -368,7 +368,7 @@ Add step kwargs to fill_between Added ``step`` kwarg to `.Axes.fill_between` to allow to fill between lines drawn using the 'step' draw style. The values of ``step`` match -those of the ``where`` kwarg of `.Axes.step`. The asymmetry of of the +those of the ``where`` kwarg of `.Axes.step`. The asymmetry of the kwargs names is not ideal, but `.Axes.fill_between` already has a ``where`` kwarg. diff --git a/examples/lines_bars_and_markers/fill.py b/examples/lines_bars_and_markers/fill.py index 158a16f863d9..e3419e805475 100644 --- a/examples/lines_bars_and_markers/fill.py +++ b/examples/lines_bars_and_markers/fill.py @@ -62,7 +62,7 @@ def _koch_snowflake_complex(order): plt.show() ############################################################################### -# Use keyword arguments *facecolor* and *edgecolor* to modify the the colors +# Use keyword arguments *facecolor* and *edgecolor* to modify the colors # of the polygon. Since the *linewidth* of the edge is 0 in the default # Matplotlib style, we have to set it as well for the edge to become visible. diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 5ad4634ffe33..48ab83f168c0 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -457,7 +457,7 @@ def _get_config_or_cache_dir(xdg_base): @_logged_cached('CONFIGDIR=%s') def get_configdir(): """ - Return the string path of the the configuration directory. + Return the string path of the configuration directory. The directory is chosen as follows: diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index af9b9b82b3e0..2785b6440319 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1785,7 +1785,7 @@ def _draw_frame(self, framedata): except TypeError: raise err from None - # check each item if is artist + # check each item if it's artist for i in self._drawn_artists: if not isinstance(i, mpl.artist.Artist): raise err diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py index b6f13f898f50..406e9db5ae54 100644 --- a/lib/matplotlib/artist.py +++ b/lib/matplotlib/artist.py @@ -1578,7 +1578,7 @@ def getp(obj, property=None): If *property* is 'somename', this function returns ``obj.get_somename()``. - If is is None (or unset), it *prints* all gettable properties from + If it's None (or unset), it *prints* all gettable properties from *obj*. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as: diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 39fa5d40fb97..66443a42e82c 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -976,7 +976,7 @@ def set_default_intervals(self): # interface provides a hook for custom types to register # default limits through the AxisInfo.default_limits # attribute, and the derived code below will check for that - # and use it if is available (else just use 0..1) + # and use it if it's available (else just use 0..1) def _set_artist_props(self, a): if a is None: diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 974846f63995..c7cb22b09f6c 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -1591,7 +1591,7 @@ def _no_output_draw(figure): def _is_non_interactive_terminal_ipython(ip): """ - Return whether we are in a a terminal IPython, but non interactive. + Return whether we are in a terminal IPython, but non interactive. When in _terminal_ IPython, ip.parent will have and `interact` attribute, if this attribute is False we do not setup eventloop integration as the diff --git a/lib/matplotlib/backend_managers.py b/lib/matplotlib/backend_managers.py index 384b453ede1c..cd9efb62c7a0 100644 --- a/lib/matplotlib/backend_managers.py +++ b/lib/matplotlib/backend_managers.py @@ -219,7 +219,7 @@ def remove_tool(self, name): tool = self.get_tool(name) tool.destroy() - # If is a toggle tool and toggled, untoggle + # If it's a toggle tool and toggled, untoggle if getattr(tool, 'toggled', False): self.trigger_tool(tool, 'toolmanager') diff --git a/lib/matplotlib/backends/backend_wx.py b/lib/matplotlib/backends/backend_wx.py index 081e7d68082c..b727cafd1ddb 100644 --- a/lib/matplotlib/backends/backend_wx.py +++ b/lib/matplotlib/backends/backend_wx.py @@ -115,7 +115,7 @@ class RendererWx(RendererBase): # wxPython allows for portable font styles, choosing them appropriately for # the target platform. Map some standard font names to the portable styles. - # QUESTION: Is it be wise to agree standard fontnames across all backends? + # QUESTION: Is it wise to agree to standard fontnames across all backends? fontnames = { 'Sans': wx.FONTFAMILY_SWISS, 'Roman': wx.FONTFAMILY_ROMAN, diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py index ce358448b126..f69c766be2cd 100644 --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -1495,7 +1495,7 @@ def violin_stats(X, method, points=100, quantiles=None): # Want quantiles to be as the same shape as data sequences if quantiles is not None and len(quantiles) != 0: quantiles = _reshape_2D(quantiles, "quantiles") - # Else, mock quantiles if is none or empty + # Else, mock quantiles if it's none or empty else: quantiles = [[]] * len(X) diff --git a/lib/matplotlib/colors.py b/lib/matplotlib/colors.py index 698b406e758e..ca1ed42af3a4 100644 --- a/lib/matplotlib/colors.py +++ b/lib/matplotlib/colors.py @@ -1272,7 +1272,7 @@ def __init__(self, vcenter, vmin=None, vmax=None): Defaults to the min value of the dataset. vmax : float, optional The data value that defines ``1.0`` in the normalization. - Defaults to the the max value of the dataset. + Defaults to the max value of the dataset. Examples -------- @@ -1739,7 +1739,7 @@ def __call__(self, value, clip=None): else: max_col = self.Ncmap # this gives us the bins in the lookup table in the range - # [0, _n_regions - 1] (the offset is baked in in the init) + # [0, _n_regions - 1] (the offset is baked in the init) iret = np.digitize(xx, self.boundaries) - 1 + self._offset # if we have more colors than regions, stretch the region # index computed above to full range of the color bins. This diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index dd2fec914aec..eb39b3884f11 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -506,7 +506,7 @@ def _single_spectrum_helper( detrend : {'none', 'mean', 'linear'} or callable, default: 'none' The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the *detrend* parameter - is a vector, in Matplotlib is it a function. The :mod:`~matplotlib.mlab` + is a vector, in Matplotlib it is a function. The :mod:`~matplotlib.mlab` module defines `.detrend_none`, `.detrend_mean`, and `.detrend_linear`, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls `.detrend_none`. 'mean' calls diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index c559a6063690..228b2f856571 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -404,7 +404,7 @@ def __init__(self, pad=None, sep=None, width=None, height=None, Notes ----- *pad* and *sep* are in points and will be scaled with the renderer - dpi, while *width* and *height* are in in pixels. + dpi, while *width* and *height* are in pixels. """ super().__init__() self.height = height diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index cf97e9035fe4..8e5dc5f3c10c 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -724,7 +724,7 @@ class Rectangle(Patch): : (xy)---- width -----+ One may picture *xy* as the bottom left corner, but which corner *xy* is - actually depends on the the direction of the axis and the sign of *width* + actually depends on the direction of the axis and the sign of *width* and *height*; e.g. *xy* would be the bottom right corner if the x-axis was inverted or if *width* was negative. """