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

Skip to content

Commit cf1b272

Browse files
committed
More misc. typos
Follow-up to #10261
1 parent 4753f6c commit cf1b272

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+94
-94
lines changed

lib/matplotlib/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
8181
:data:`~matplotlib.rcParams`
8282
a global dictionary of default configuration settings. It is
83-
initialized by code which may be overridded by a matplotlibrc
83+
initialized by code which may be overridden by a matplotlibrc
8484
file.
8585
8686
:func:`~matplotlib.rc`
@@ -775,7 +775,7 @@ def get_py2exe_datafiles():
775775
d = {}
776776
for root, _, files in os.walk(datapath):
777777
# Need to explicitly remove cocoa_agg files or py2exe complains
778-
# NOTE I dont know why, but do as previous version
778+
# NOTE I don't know why, but do as previous version
779779
if 'Matplotlib.nib' in files:
780780
files.remove('Matplotlib.nib')
781781
files = [os.path.join(root, filename) for filename in files]
@@ -1147,7 +1147,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):
11471147
if not os.path.isabs(rcParams['examples.directory']):
11481148
_basedir, _fname = os.path.split(matplotlib_fname())
11491149
# Sometimes matplotlib_fname() can return relative paths,
1150-
# Also, using realpath() guarentees that Sphinx will use
1150+
# Also, using realpath() guarantees that Sphinx will use
11511151
# the same path that matplotlib sees (in case of weird symlinks).
11521152
_basedir = os.path.realpath(_basedir)
11531153
_fullpath = os.path.join(_basedir, rcParams['examples.directory'])

lib/matplotlib/artist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ def aliased_name_rest(self, s, target):
12451245

12461246
def pprint_setters(self, prop=None, leadingspace=2):
12471247
"""
1248-
If *prop* is *None*, return a list of strings of all settable properies
1248+
If *prop* is *None*, return a list of strings of all settable properties
12491249
and their valid values.
12501250
12511251
If *prop* is not *None*, it is a valid property name and that
@@ -1273,7 +1273,7 @@ def pprint_setters(self, prop=None, leadingspace=2):
12731273

12741274
def pprint_setters_rest(self, prop=None, leadingspace=2):
12751275
"""
1276-
If *prop* is *None*, return a list of strings of all settable properies
1276+
If *prop* is *None*, return a list of strings of all settable properties
12771277
and their valid values. Format the output for ReST
12781278
12791279
If *prop* is not *None*, it is a valid property name and that

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ def plot(self, *args, **kwargs):
13611361
13621362
By default, each line is assigned a different style specified by a
13631363
'style cycle'. The *fmt* and line property parameters are only
1364-
neccessary if you want explicit deviations from these defaults.
1364+
necessary if you want explicit deviations from these defaults.
13651365
Alternatively, you can also change the style cycle using the
13661366
'axes.prop_cycle' rcParam.
13671367
@@ -6279,7 +6279,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
62796279
The type of histogram to draw.
62806280
62816281
- 'bar' is a traditional bar-type histogram. If multiple data
6282-
are given the bars are aranged side by side.
6282+
are given the bars are arranged side by side.
62836283
62846284
- 'barstacked' is a bar-type histogram where multiple
62856285
data are stacked on top of each other.
@@ -6338,7 +6338,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
63386338
63396339
stacked : boolean, optional
63406340
If ``True``, multiple data are stacked on top of each other If
6341-
``False`` multiple data are aranged side by side if histtype is
6341+
``False`` multiple data are arranged side by side if histtype is
63426342
'bar' or on top of each other if histtype is 'step'
63436343
63446344
Default is ``False``

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3117,7 +3117,7 @@ def set_xscale(self, value, **kwargs):
31173117
31183118
See also
31193119
--------
3120-
matplotlib.scale.LinearScale : linear transfrom
3120+
matplotlib.scale.LinearScale : linear transform
31213121
31223122
matplotlib.scale.LogTransform : log transform
31233123
@@ -3442,7 +3442,7 @@ def set_yscale(self, value, **kwargs):
34423442
34433443
See also
34443444
--------
3445-
matplotlib.scale.LinearScale : linear transfrom
3445+
matplotlib.scale.LinearScale : linear transform
34463446
34473447
matplotlib.scale.LogTransform : log transform
34483448

lib/matplotlib/axis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def set_label_coords(self, x, y, transform=None):
714714
coordinate of the y label is determined by the tick label
715715
bounding boxes, but this can lead to poor alignment of
716716
multiple ylabels if there are multiple axes. Ditto for the y
717-
coodinate of the x label.
717+
coordinate of the x label.
718718
719719
You can also specify the coordinate system of the label with
720720
the transform. If None, the default coordinate system will be

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2936,7 +2936,7 @@ def pan(self, *args):
29362936
self.set_message(self.mode)
29372937

29382938
def press(self, event):
2939-
"""Called whenver a mouse button is pressed."""
2939+
"""Called whenever a mouse button is pressed."""
29402940

29412941
def press_pan(self, event):
29422942
"""Callback for mouse button press in pan/zoom mode."""

lib/matplotlib/backend_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ToolBase(object):
5454
Keymap to associate with this tool
5555
5656
**String**: List of comma separated keys that will be used to call this
57-
tool when the keypress event of *self.figure.canvas* is emited
57+
tool when the keypress event of *self.figure.canvas* is emitted
5858
"""
5959

6060
description = None
@@ -154,7 +154,7 @@ class ToolToggleBase(ToolBase):
154154
``*args``
155155
Variable length argument to be used by the Tool
156156
``**kwargs``
157-
`toggled` if present and True, sets the initial state ot the Tool
157+
`toggled` if present and True, sets the initial state of the Tool
158158
Arbitrary keyword arguments to be consumed by the Tool
159159
"""
160160

@@ -228,7 +228,7 @@ def set_figure(self, figure):
228228
if figure:
229229
self.trigger(self, None)
230230
else:
231-
# if there is no figure, triggen wont change the internal state
231+
# if there is no figure, trigger wont change the internal state
232232
# we change it back
233233
self._toggled = True
234234

lib/matplotlib/backends/backend_gtk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def destroy(self, *args):
575575
def show(self):
576576
# show the figure window
577577
self.window.show()
578-
# raise the window above others and relase the "above lock"
578+
# raise the window above others and release the "above lock"
579579
self.window.set_keep_above(True)
580580
self.window.set_keep_above(False)
581581

lib/matplotlib/backends/backend_gtk3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def _get_toolbar(self):
441441
return toolbar
442442

443443
def _get_toolmanager(self):
444-
# must be initialised after toolbar has been setted
444+
# must be initialised after toolbar has been set
445445
if rcParams['toolbar'] == 'toolmanager':
446446
toolmanager = ToolManager(self.canvas.figure)
447447
else:

lib/matplotlib/backends/backend_ps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self):
5454
@property
5555
def gs_exe(self):
5656
"""
57-
excutable name of ghostscript.
57+
executable name of ghostscript.
5858
"""
5959
try:
6060
return self._cached["gs_exe"]
@@ -536,7 +536,7 @@ def draw_markers(
536536
ps_color = '%1.3f %1.3f %1.3f setrgbcolor' % rgbFace[:3]
537537

538538
# construct the generic marker command:
539-
ps_cmd = ['/o {', 'gsave', 'newpath', 'translate'] # dont want the translate to be global
539+
ps_cmd = ['/o {', 'gsave', 'newpath', 'translate'] # don't want the translate to be global
540540

541541
lw = gc.get_linewidth()
542542
stroke = lw != 0.0

lib/matplotlib/backends/backend_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
5757
* classes Upper or MixedUpperCase
5858
59-
* varables lower or lowerUpper
59+
* variables lower or lowerUpper
6060
6161
* functions lower or underscore_separated
6262

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def _update_pointer_position(self, guiEvent=None):
269269
#
270270
# 2) call enter/leave events explicitly. The downside of this
271271
# in the impl below is that enter could be repeatedly
272-
# triggered if thes mouse is over the axes and one is
272+
# triggered if the mouse is over the axes and one is
273273
# resizing with the keyboard. This is not entirely bad,
274274
# because the mouse position relative to the canvas is
275275
# changing, but it may be surprising to get repeated entries

lib/matplotlib/backends/web_backend/js/nbagg_mpl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var comm_websocket_adapter = function(comm) {
1414
// Register the callback with on_msg.
1515
comm.on_msg(function(msg) {
1616
//console.log('receiving', msg['content']['data'], msg);
17-
// Pass the mpl event to the overriden (by mpl) onmessage function.
17+
// Pass the mpl event to the overridden (by mpl) onmessage function.
1818
ws.onmessage(msg['content']['data'])
1919
});
2020
return ws;

lib/matplotlib/backends/web_backend/nbagg_uat.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
"\n",
400400
"### UAT 15 - Figure face colours\n",
401401
"\n",
402-
"The nbagg honours all colours appart from that of the figure.patch. The two plots below should produce a figure with a red background. There should be no yellow figure."
402+
"The nbagg honours all colours apart from that of the figure.patch. The two plots below should produce a figure with a red background. There should be no yellow figure."
403403
]
404404
},
405405
{
@@ -570,7 +570,7 @@
570570
"cell_type": "markdown",
571571
"metadata": {},
572572
"source": [
573-
"### UAT17 - stoping figure when removed from DOM\n",
573+
"### UAT17 - stopping figure when removed from DOM\n",
574574
"\n",
575575
"When the div that contains from the figure is removed from the DOM the figure should shut down it's comm, and if the python-side figure has no more active comms, it should destroy the figure. Repeatedly running the cell below should always have the same figure number"
576576
]

lib/matplotlib/bezier.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def get_parallels(bezier2, width):
335335
"""
336336

337337
# The parallel bezier lines are constructed by following ways.
338-
# c1 and c2 are contol points representing the begin and end of the
338+
# c1 and c2 are control points representing the begin and end of the
339339
# bezier line.
340340
# cm is the middle point
341341

@@ -358,7 +358,7 @@ def get_parallels(bezier2, width):
358358
cos_t2, sin_t2 = get_cos_sin(cmx, cmy, c2x, c2y)
359359

360360
# find c1_left, c1_right which are located along the lines
361-
# throught c1 and perpendicular to the tangential lines of the
361+
# through c1 and perpendicular to the tangential lines of the
362362
# bezier path at a distance of width. Same thing for c2_left and
363363
# c2_right with respect to c2.
364364
c1x_left, c1y_left, c1x_right, c1y_right = (
@@ -369,7 +369,7 @@ def get_parallels(bezier2, width):
369369
)
370370

371371
# find cm_left which is the intersectng point of a line through
372-
# c1_left with angle t1 and a line throught c2_left with angle
372+
# c1_left with angle t1 and a line through c2_left with angle
373373
# t2. Same with cm_right.
374374
if parallel_test != 0:
375375
# a special case for a straight line, i.e., angle between two
@@ -389,7 +389,7 @@ def get_parallels(bezier2, width):
389389
sin_t1, c2x_right, c2y_right,
390390
cos_t2, sin_t2)
391391

392-
# the parralel bezier lines are created with control points of
392+
# the parallel bezier lines are created with control points of
393393
# [c1_left, cm_left, c2_left] and [c1_right, cm_right, c2_right]
394394
path_left = [(c1x_left, c1y_left),
395395
(cmx_left, cmy_left),
@@ -402,7 +402,7 @@ def get_parallels(bezier2, width):
402402

403403

404404
def find_control_points(c1x, c1y, mmx, mmy, c2x, c2y):
405-
""" Find control points of the bezier line throught c1, mm, c2. We
405+
""" Find control points of the bezier line through c1, mm, c2. We
406406
simply assume that c1, mm, c2 which have parametric value 0, 0.5, and 1.
407407
"""
408408

@@ -415,7 +415,7 @@ def find_control_points(c1x, c1y, mmx, mmy, c2x, c2y):
415415
def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):
416416
"""
417417
Being similar to get_parallels, returns control points of two quadrativ
418-
bezier lines having a width roughly parralel to given one separated by
418+
bezier lines having a width roughly parallel to given one separated by
419419
*width*.
420420
"""
421421

@@ -424,13 +424,13 @@ def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):
424424
cmx, cmy = bezier2[1]
425425
c3x, c3y = bezier2[2]
426426

427-
# t1 and t2 is the anlge between c1 and cm, cm, c3.
427+
# t1 and t2 is the angle between c1 and cm, cm, c3.
428428
# They are also a angle of the tangential line of the path at c1 and c3
429429
cos_t1, sin_t1 = get_cos_sin(c1x, c1y, cmx, cmy)
430430
cos_t2, sin_t2 = get_cos_sin(cmx, cmy, c3x, c3y)
431431

432432
# find c1_left, c1_right which are located along the lines
433-
# throught c1 and perpendicular to the tangential lines of the
433+
# through c1 and perpendicular to the tangential lines of the
434434
# bezier path at a distance of width. Same thing for c3_left and
435435
# c3_right with respect to c3.
436436
c1x_left, c1y_left, c1x_right, c1y_right = (

lib/matplotlib/cbook/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ class Grouper(object):
14511451
would be overkill.
14521452
14531453
Objects can be joined using :meth:`join`, tested for connectedness
1454-
using :meth:`joined`, and all disjoint sets can be retreived by
1454+
using :meth:`joined`, and all disjoint sets can be retrieved by
14551455
using the object as an iterator.
14561456
14571457
The objects being joined must be hashable and weak-referenceable.

lib/matplotlib/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def _get_extension_lengths(self, frac, automin, automax, default=0.05):
766766
try:
767767
# Try to set min and max extension fractions directly.
768768
extendlength[:] = frac
769-
# If frac is a sequence contaning None then NaN may
769+
# If frac is a sequence containing None then NaN may
770770
# be encountered. This is an error.
771771
if np.isnan(extendlength).any():
772772
raise ValueError()
@@ -1295,7 +1295,7 @@ def _add_solids(self, X, Y, C):
12951295

12961296
n_segments = len(C)
12971297

1298-
# ensure there are sufficent hatches
1298+
# ensure there are sufficient hatches
12991299
hatches = self.mappable.hatches * n_segments
13001300

13011301
patches = []

lib/matplotlib/colors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def makeMappingArray(N, data, gamma=1.0):
377377
try:
378378
adata = np.array(data)
379379
except Exception:
380-
raise TypeError("data must be convertable to an array")
380+
raise TypeError("data must be convertible to an array")
381381
shape = adata.shape
382382
if len(shape) != 2 or shape[1] != 3:
383383
raise ValueError("data must be nx3 format")
@@ -462,7 +462,7 @@ def __call__(self, X, alpha=None, bytes=False):
462462
463463
Returns
464464
-------
465-
Tuple of RGBA values if X is scalar, othewise an array of
465+
Tuple of RGBA values if X is scalar, otherwise an array of
466466
RGBA values with a shape of ``X.shape + (4, )``.
467467
468468
"""
@@ -1427,7 +1427,7 @@ def hsv_to_rgb(hsv):
14271427
raise ValueError("Last dimension of input array must be 3; "
14281428
"shape {shp} was found.".format(shp=hsv.shape))
14291429

1430-
# if we got pased a 1D array, try to treat as
1430+
# if we got passed a 1D array, try to treat as
14311431
# a single color and reshape as needed
14321432
in_ndim = hsv.ndim
14331433
if in_ndim == 1:

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def add_label_near(self, x, y, inline=True, inline_spacing=5,
547547
paths = self.collections[conmin].get_paths()
548548
# grab the correct segment
549549
active_path = paths[segmin]
550-
# grab it's verticies
550+
# grab its vertices
551551
lc = active_path.vertices
552552
# sort out where the new vertex should be added data-units
553553
xcmin = self.ax.transData.inverted().transform_point([xmin, ymin])

0 commit comments

Comments
 (0)