Skip to content

DOC: fix typos #20042

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 2 commits into from
Apr 23, 2021
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
2 changes: 1 addition & 1 deletion doc/api/prev_api_changes/api_changes_2.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/api/prev_api_changes/api_changes_3.3.0/behaviour.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 ::

<BarContainer object of of 10 artists> # "bar", "barstacked"
<BarContainer object of 10 artists> # "bar", "barstacked"
[<matplotlib.patches.Polygon object at 0xdeadbeef>] # "step", "stepfilled"

instead of ::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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``
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/devel/MEP/MEP22.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/users/prev_whats_new/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions doc/users/prev_whats_new/github_stats_3.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/users/prev_whats_new/whats_new_1.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion examples/lines_bars_and_markers/fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better just delete this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure, I can also mimic the neighboring comments with # check if each item is artist

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's basically what the code does; there's no point in having the comment.

for i in self._drawn_artists:
if not isinstance(i, mpl.artist.Artist):
raise err
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/cbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a typo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prob should be baked-in in the init

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing this in a follow-up PR since this one was merged before I could address it.

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
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/mlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down