Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2771894

Browse files
authored
Merge pull request #25664 from QuLogic/fix-cannot
Fix 'can not' -> 'cannot' typo
2 parents 26e9f51 + ab4ac3f commit 2771894

33 files changed

+54
-56
lines changed

doc/api/toolkits/mplot3d/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ of another object, even though it is physically behind it. This can result in
2525
plots that do not look "physically correct."
2626

2727
Unfortunately, while some work is being done to reduce the occurrence of this
28-
artifact, it is currently an intractable problem, and can not be fully solved
28+
artifact, it is currently an intractable problem, and cannot be fully solved
2929
until matplotlib supports 3D graphics rendering at its core.
3030

3131
The problem occurs due to the reduction of 3D data down to 2D + z-order
3232
scalar. A single value represents the 3rd dimension for all parts of 3D
3333
objects in a collection. Therefore, when the bounding boxes of two collections
3434
intersect, it becomes possible for this artifact to occur. Furthermore, the
35-
intersection of two 3D objects (such as polygons or patches) can not be
35+
intersection of two 3D objects (such as polygons or patches) cannot be
3636
rendered properly in matplotlib's 2D rendering engine.
3737

3838
This problem will likely not be solved until OpenGL support is added to all of

doc/devel/MEP/MEP11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ordered from best/hardest to worst/easiest):
135135

136136
2. Continue to ship dateutil_, pytz_, six_ and pyparsing_ in
137137
our installer, but use the post-install-script to install them
138-
*only* if they can not already be found.
138+
*only* if they cannot already be found.
139139

140140
3. Move all of these packages inside a (new) ``matplotlib.extern``
141141
namespace so it is clear for outside users that these are

doc/devel/MEP/MEP14.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ has a number of shortcomings.
6262
- It only handles right-to-left languages, and doesn't handle many
6363
special features of Unicode, such as combining diacriticals.
6464
- The multiline support is imperfect and only supports manual
65-
line-breaking -- it can not break up a paragraph into lines of a
65+
line-breaking -- it cannot break up a paragraph into lines of a
6666
certain length.
6767
- It also does not handle inline formatting changes in order to
6868
support something like Markdown, reStructuredText or HTML. (Though
@@ -112,7 +112,7 @@ complicated than it seems at first.
112112
The "built-in" and "usetex" renderers have very different ways of
113113
handling font selection, given their different technologies. TeX
114114
requires the installation of TeX-specific font packages, for example,
115-
and can not use TrueType fonts directly. Unfortunately, despite the
115+
and cannot use TrueType fonts directly. Unfortunately, despite the
116116
different semantics for font selection, the same set of font
117117
properties are used for each. This is true of both the
118118
`.FontProperties` class and the font-related `.rcParams` (which

doc/devel/MEP/MEP19.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ has a number of shortcomings:
3636
- build or test products can only be saved from build off of branches
3737
on the main repo, not pull requests, so it is often difficult to
3838
"post mortem" analyse what went wrong. This is particularly
39-
frustrating when the failure can not be subsequently reproduced
39+
frustrating when the failure cannot be subsequently reproduced
4040
locally.
4141

4242
- It is not extremely fast. matplotlib's cpu and memory requirements

doc/devel/coding_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ Backport strategy
446446

447447
We will always backport to the patch release branch (*v3.N.x*):
448448

449-
- critical bug fixes (segfault, failure to import, things that the
450-
user can not work around)
449+
- critical bug fixes (segfault, failure to import, things that the user cannot
450+
work around)
451451
- fixes for regressions against the last two releases.
452452

453453
Everything else (regressions against older releases, bugs/api

doc/devel/triage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ The following workflow [1]_ is a good way to approach issue triaging:
157157
If a reproducible example is provided, but you see a simplification,
158158
add your simpler reproducible example.
159159

160-
If you can not reproduce the issue, please report that along with your
160+
If you cannot reproduce the issue, please report that along with your
161161
OS, Python, and Matplotlib versions.
162162

163163
If we need more information from either this or the previous step

doc/users/faq/troubleshooting_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ will save a lot of time.
149149
You will likely get a faster response writing to the mailing list than
150150
filing a bug in the bug tracker. Most developers check the bug
151151
tracker only periodically. If your problem has been determined to be
152-
a bug and can not be quickly solved, you may be asked to file a bug in
152+
a bug and cannot be quickly solved, you may be asked to file a bug in
153153
the tracker so the issue doesn't get lost.
154154

155155
.. _git-trouble:

doc/users/prev_whats_new/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ recent changes, please refer to the :doc:`/users/release_notes`.
22702270
Fix a "local variable unreferenced" bug in plotfile - MM
22712271

22722272
2008-05-19
2273-
Fix crash when Windows can not access the registry to determine font path
2273+
Fix crash when Windows cannot access the registry to determine font path
22742274
[Bug 1966974, thanks Patrik Simons] - MGD
22752275

22762276
2008-05-16
@@ -2493,7 +2493,7 @@ recent changes, please refer to the :doc:`/users/release_notes`.
24932493

24942494
2008-01-10
24952495
Fix bug when displaying a tick value offset with scientific notation.
2496-
(Manifests itself as a warning that the \times symbol can not be found). -
2496+
(Manifests itself as a warning that the \times symbol cannot be found). -
24972497
MGD
24982498

24992499
2008-01-10

doc/users/prev_whats_new/dflt_style_changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ behavior for the line width was different depending on backend:
657657
- PS: 1 px
658658
- Agg: 1 px
659659

660-
The old line width behavior can not be restored across all backends
660+
The old line width behavior cannot be restored across all backends
661661
simultaneously, but can be restored for a single backend by setting::
662662

663663
mpl.rcParams['hatch.linewidth'] = 0.1 # previous pdf hatch linewidth

doc/users/prev_whats_new/github_stats_3.0.2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Issues (170):
342342
* :ghissue:`12626`: AttributeError: module 'matplotlib' has no attribute 'artist'
343343
* :ghissue:`11034`: Doc Typo: matplotlib.axes.Axes.get_yticklabels / Axis.get_ticklabels
344344
* :ghissue:`12624`: make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf, png.
345-
* :ghissue:`11094`: can not use GUI backends inside django request handlers
345+
* :ghissue:`11094`: cannot use GUI backends inside django request handlers
346346
* :ghissue:`12613`: transiently linked interactivity of unshared pair of axes generated with make_axes_locatable
347347
* :ghissue:`12578`: macOS builds are broken
348348
* :ghissue:`12612`: gui backends do not work inside of flask request handlers

doc/users/prev_whats_new/github_stats_3.3.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Issues (25):
114114
* :ghissue:`18232`: different behaviour between 3.3.0 and 3.2.2 (and earlier) for ploting in a Tk canvas
115115
* :ghissue:`18212`: Updated WxAgg NavigationToolbar2 breaks custom toolbars
116116
* :ghissue:`18129`: Error reading png image from URL with imread in matplotlib 3.3
117-
* :ghissue:`18163`: Figure can not be closed if it has associated Agg canvas
117+
* :ghissue:`18163`: Figure cannot be closed if it has associated Agg canvas
118118
* :ghissue:`17974`: Major speed regression introduced in "plt.bar" definition clipping between 3.0.3 and 3.3.0.
119119
* :ghissue:`17998`: New warning: Substituting symbol \perp from STIXGeneral
120120
* :ghissue:`18057`: Fails to install in FreeBSD

doc/users/prev_whats_new/github_stats_3.5.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ Issues (187):
12291229
* :ghissue:`19259`: Set legend title font properties
12301230
* :ghissue:`20049`: add legend.labelcolor "argument" to mplstyle stylesheet
12311231
* :ghissue:`20452`: Wrong/not useful error message when plotting incompatible x and y
1232-
* :ghissue:`20266`: "$$" can not be displayed by ax.text()
1232+
* :ghissue:`20266`: "$$" cannot be displayed by ax.text()
12331233
* :ghissue:`20517`: Wrong shape of Z in documentation of contour
12341234
* :ghissue:`19423`: Switch to pydata-sphinx-theme
12351235
* :ghissue:`20435`: Legend Text's ``axes`` attribute is ``None``

doc/users/prev_whats_new/github_stats_3.6.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ Issues (202):
11831183
* :ghissue:`22947`: [Bug]: Can't use ``plt.sca()`` on axes created using subfigures
11841184
* :ghissue:`22623`: [ENH]: support rect with constrained_layout ("layout only to part of the figure")
11851185
* :ghissue:`22917`: "ab;cd" missing in subplot_mosaic tutorial
1186-
* :ghissue:`22686`: [Bug]: can not give init value for RangeSlider widget
1186+
* :ghissue:`22686`: [Bug]: cannot give init value for RangeSlider widget
11871187
* :ghissue:`22740`: [MNT]: Add codespell to pre-commit hooks
11881188
* :ghissue:`22893`: rainbow text example is broken
11891189
* :ghissue:`21571`: [Doc]: Clarify text positioning

galleries/users_explain/figure/interactive.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Jupyter Notebooks / JupyterLab
266266
the inline backend, is not. `~ipykernel.pylab.backend_inline`
267267
renders the figure once and inserts a static image into the
268268
notebook when the cell is executed. Because the images are static, they
269-
can not be panned / zoomed, take user input, or be updated from other
269+
cannot be panned / zoomed, take user input, or be updated from other
270270
cells.
271271

272272
To get interactive figures in the 'classic' notebook or Jupyter lab,

galleries/users_explain/figure/interactive_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Blocking the prompt
110110

111111
The simplest "integration" is to start the GUI event loop in
112112
'blocking' mode and take over the CLI. While the GUI event loop is
113-
running you can not enter new commands into the prompt (your terminal
113+
running you cannot enter new commands into the prompt (your terminal
114114
may echo the characters typed into the terminal, but they will not be
115115
sent to the Python interpreter because it is busy running the GUI
116116
event loop), but the figure windows will be responsive. Once the

galleries/users_explain/text/fonts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
-------------
172172
173173
There is no font that covers the entire Unicode space thus it is possible for the
174-
users to require a mix of glyphs that can not be satisfied from a single font.
174+
users to require a mix of glyphs that cannot be satisfied from a single font.
175175
While it has been possible to use multiple fonts within a Figure, on distinct
176176
`.Text` instances, it was not previous possible to use multiple fonts in the
177177
same `.Text` instance (as a web browser does). As of Matplotlib 3.6 the Agg,

galleries/users_explain/text/mathtext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
\sqrt{2}
146146
147147
Any base can (optionally) be provided inside square brackets. Note that the
148-
base must be a simple expression, and can not contain layout commands such as
148+
base must be a simple expression, and cannot contain layout commands such as
149149
fractions or sub/superscripts::
150150
151151
r'$\sqrt[3]{x}$'
@@ -306,7 +306,7 @@
306306
:rc:`mathtext.fallback` to either ``'cm'``, ``'stix'`` or ``'stixsans'``
307307
which will cause the mathtext system to use
308308
characters from an alternative font whenever a particular
309-
character can not be found in the custom font.
309+
character cannot be found in the custom font.
310310
311311
Note that the math glyphs specified in Unicode have evolved over time, and many
312312
fonts may not have glyphs in the correct place for mathtext.

lib/matplotlib/_mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class UnicodeFonts(TruetypeFonts):
462462
complete set of math symbols is STIX.
463463
464464
This class will "fallback" on the Bakoma fonts when a required
465-
symbol can not be found in the font.
465+
symbol cannot be found in the font.
466466
"""
467467

468468
# Some glyphs are not present in the `cmr10` font, and must be brought in

lib/matplotlib/animation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ def finish(self):
797797
**mode_dict))
798798

799799
# Duplicate the temporary file clean up logic from
800-
# FileMovieWriter.finish. We can not call the inherited version of
800+
# FileMovieWriter.finish. We cannot call the inherited version of
801801
# finish because it assumes that there is a subprocess that we either
802802
# need to call to merge many frames together or that there is a
803803
# subprocess call that we need to clean up.
@@ -963,10 +963,10 @@ class to use, such as 'ffmpeg'.
963963
964964
def func(current_frame: int, total_frames: int) -> Any
965965
966-
where *current_frame* is the current frame number and
967-
*total_frames* is the total number of frames to be saved.
968-
*total_frames* is set to None, if the total number of frames can
969-
not be determined. Return values may exist but are ignored.
966+
where *current_frame* is the current frame number and *total_frames* is the
967+
total number of frames to be saved. *total_frames* is set to None, if the
968+
total number of frames cannot be determined. Return values may exist but are
969+
ignored.
970970
971971
Example code to write the progress to stdout::
972972

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4627,7 +4627,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
46274627
"ignoring the edgecolor in favor of the facecolor. This "
46284628
"behavior may change in the future."
46294629
)
4630-
# We need to handle markers that can not be filled (like
4630+
# We need to handle markers that cannot be filled (like
46314631
# '+' and 'x') differently than markers that can be
46324632
# filled, but have their fillstyle set to 'none'. This is
46334633
# to get:
@@ -4642,7 +4642,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
46424642
# promote the facecolor to be the edgecolor
46434643
edgecolors = colors
46444644
# set the facecolor to 'none' (at the last chance) because
4645-
# we can not fill a path if the facecolor is non-null
4645+
# we cannot fill a path if the facecolor is non-null
46464646
# (which is defendable at the renderer level).
46474647
colors = 'none'
46484648
else:
@@ -4879,13 +4879,13 @@ def reduce_C_function(C: array) -> float
48794879

48804880
if xscale == 'log':
48814881
if np.any(x <= 0.0):
4882-
raise ValueError("x contains non-positive values, so can not "
4883-
"be log-scaled")
4882+
raise ValueError(
4883+
"x contains non-positive values, so cannot be log-scaled")
48844884
tx = np.log10(tx)
48854885
if yscale == 'log':
48864886
if np.any(y <= 0.0):
4887-
raise ValueError("y contains non-positive values, so can not "
4888-
"be log-scaled")
4887+
raise ValueError(
4888+
"y contains non-positive values, so cannot be log-scaled")
48894889
ty = np.log10(ty)
48904890
if extent is not None:
48914891
xmin, xmax, ymin, ymax = extent

lib/matplotlib/backends/backend_agg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,17 @@ def draw_path(self, gc, path, transform, rgbFace=None):
147147
except OverflowError:
148148
cant_chunk = ''
149149
if rgbFace is not None:
150-
cant_chunk += "- can not split filled path\n"
150+
cant_chunk += "- cannot split filled path\n"
151151
if gc.get_hatch() is not None:
152-
cant_chunk += "- can not split hatched path\n"
152+
cant_chunk += "- cannot split hatched path\n"
153153
if not path.should_simplify:
154154
cant_chunk += "- path.should_simplify is False\n"
155155
if len(cant_chunk):
156156
msg = (
157157
"Exceeded cell block limit in Agg, however for the "
158158
"following reasons:\n\n"
159159
f"{cant_chunk}\n"
160-
"we can not automatically split up this path to draw."
160+
"we cannot automatically split up this path to draw."
161161
"\n\nPlease manually simplify your path."
162162
)
163163

lib/matplotlib/backends/backend_wx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def gui_repaint(self, drawDC=None):
587587
return
588588
if not drawDC: # not called from OnPaint use a ClientDC
589589
drawDC = wx.ClientDC(self)
590-
# For 'WX' backend on Windows, the bitmap can not be in use by another
590+
# For 'WX' backend on Windows, the bitmap cannot be in use by another
591591
# DC (see GraphicsContextWx._cache).
592592
bmp = (self.bitmap.ConvertToImage().ConvertToBitmap()
593593
if wx.Platform == '__WXMSW__'

lib/matplotlib/cbook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,8 +1633,8 @@ def safe_isfinite(val):
16331633
try:
16341634
return np.isfinite(val) if np.isscalar(val) else True
16351635
except TypeError:
1636-
# This is something that numpy can not make heads or tails
1637-
# of, assume "finite"
1636+
# This is something that NumPy cannot make heads or tails of,
1637+
# assume "finite"
16381638
return True
16391639
if skip_nonfinite is False:
16401640
if isinstance(obj, collections.abc.Iterator):

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ def _do_layout(gs, mosaic, unique_ids, nested):
20362036
this_level[(start_row, start_col)] = (name, slc, 'axes')
20372037

20382038
# do the same thing for the nested mosaics (simpler because these
2039-
# can not be spans yet!)
2039+
# cannot be spans yet!)
20402040
for (j, k), nested_mosaic in nested.items():
20412041
this_level[(j, k)] = (None, nested_mosaic, 'nested')
20422042

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ def is_opentype_cff_font(filename):
14791479
"""
14801480
Return whether the given font is a Postscript Compact Font Format Font
14811481
embedded in an OpenType wrapper. Used by the PostScript and PDF backends
1482-
that can not subset these fonts.
1482+
that cannot subset these fonts.
14831483
"""
14841484
if os.path.splitext(filename)[1].lower() == '.otf':
14851485
with open(filename, 'rb') as fd:

lib/matplotlib/layout_engine.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,8 @@ class PlaceHolderLayoutEngine(LayoutEngine):
104104
"""
105105
This layout engine does not adjust the figure layout at all.
106106
107-
The purpose of this `.LayoutEngine` is to act as a placeholder when the
108-
user removes a layout engine to ensure an incompatible `.LayoutEngine` can
109-
not be set later.
107+
The purpose of this `.LayoutEngine` is to act as a placeholder when the user removes
108+
a layout engine to ensure an incompatible `.LayoutEngine` cannot be set later.
110109
111110
Parameters
112111
----------

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
#mathtext.sf: sans
347347
#mathtext.tt: monospace
348348
#mathtext.fallback: cm # Select fallback font from ['cm' (Computer Modern), 'stix'
349-
# 'stixsans'] when a symbol can not be found in one of the
349+
# 'stixsans'] when a symbol cannot be found in one of the
350350
# custom math fonts. Select 'None' to not perform fallback
351351
# and replace the missing character by a dummy symbol.
352352
#mathtext.default: it # The default font to use for math.

lib/matplotlib/mpl-data/stylelib/classic.mplstyle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mathtext.sf : sans\-serif
158158
mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix',
159159
# 'stixsans' or 'custom'
160160
mathtext.fallback: cm # Select fallback font from ['cm' (Computer Modern), 'stix'
161-
# 'stixsans'] when a symbol can not be found in one of the
161+
# 'stixsans'] when a symbol cannot be found in one of the
162162
# custom math fonts. Select 'None' to not perform fallback
163163
# and replace the missing character by a dummy.
164164

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ def __init__(self, xy, width, height, *,
19361936
"""
19371937
fill = kwargs.setdefault('fill', False)
19381938
if fill:
1939-
raise ValueError("Arc objects can not be filled")
1939+
raise ValueError("Arc objects cannot be filled")
19401940

19411941
super().__init__(xy, width, height, angle=angle, **kwargs)
19421942

lib/matplotlib/tests/test_agg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ def test_chunksize_fails():
303303
gc.set_foreground('r')
304304

305305
gc.set_hatch('/')
306-
with pytest.raises(OverflowError, match='can not split hatched path'):
306+
with pytest.raises(OverflowError, match='cannot split hatched path'):
307307
ra.draw_path(gc, path, IdentityTransform())
308308
gc.set_hatch(None)
309309

310-
with pytest.raises(OverflowError, match='can not split filled path'):
310+
with pytest.raises(OverflowError, match='cannot split filled path'):
311311
ra.draw_path(gc, path, IdentityTransform(), (1, 0, 0))
312312

313313
# Set to zero to disable, currently defaults to 0, but let's be sure.

lib/matplotlib/ticker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,8 +2309,7 @@ def tick_values(self, vmin, vmax):
23092309

23102310
if vmin <= 0.0 or not np.isfinite(vmin):
23112311
raise ValueError(
2312-
"Data has no positive values, and therefore can not be "
2313-
"log-scaled.")
2312+
"Data has no positive values, and therefore cannot be log-scaled.")
23142313

23152314
_log.debug('vmin %s vmax %s', vmin, vmax)
23162315

0 commit comments

Comments
 (0)