Skip to content

Commit 2f9ee04

Browse files
authored
Merge pull request #9476 from anntzer/line-continuations
Get rid of a few unnecessary line continuations in strings.
2 parents 9ea08fb + 3cc23b0 commit 2f9ee04

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

examples/text_labels_and_annotations/autowrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
fig = plt.figure()
1313
plt.axis([0, 10, 0, 10])
14-
t = "This is a really long string that I'd rather have wrapped so that it"\
15-
" doesn't go outside of the figure, but if it's long enough it will go"\
16-
" off the top or bottom!"
14+
t = ("This is a really long string that I'd rather have wrapped so that it "
15+
"doesn't go outside of the figure, but if it's long enough it will go "
16+
"off the top or bottom!")
1717
plt.text(4, 1, t, ha='left', rotation=15, wrap=True)
1818
plt.text(6, 5, t, ha='left', rotation=15, wrap=True)
1919
plt.text(5, 5, t, ha='right', rotation=-15, wrap=True)

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ def legend(self, *args, **kwargs):
352352
corner of the legend in axes coordinates (in which case
353353
``bbox_to_anchor`` will be ignored).
354354
355-
bbox_to_anchor : :class:`matplotlib.transforms.BboxBase` instance \
356-
or tuple of floats
355+
bbox_to_anchor : `~.BboxBase` or pair of floats
357356
Specify any arbitrary location for the legend in `bbox_transform`
358357
coordinates (default Axes coordinates).
359358
@@ -4230,10 +4229,10 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
42304229
linewidths : scalar, optional, default is *None*
42314230
If *None*, defaults to 1.0.
42324231
4233-
edgecolors : {'face', 'none', *None*} or mpl color, optional, default\
4234-
is 'face'
4232+
edgecolors : {'face', 'none', *None*} or color, optional
42354233
4236-
If 'face', draws the edges in the same color as the fill color.
4234+
If 'face' (the default), draws the edges in the same color as the
4235+
fill color.
42374236
42384237
If 'none', no edge is drawn; this can sometimes lead to unsightly
42394238
unpainted pixels between the hexagons.

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,8 +3639,9 @@ def _set_view_from_bbox(self, bbox, direction='in',
36393639
xzc + xwidth/2./scl, yzc + ywidth/2./scl]
36403640
elif len(bbox) != 4:
36413641
# should be len 3 or 4 but nothing else
3642-
warnings.warn('Warning in _set_view_from_bbox: bounding box is not a\
3643-
tuple of length 3 or 4. Ignoring the view change...')
3642+
warnings.warn(
3643+
"Warning in _set_view_from_bbox: bounding box is not a tuple "
3644+
"of length 3 or 4. Ignoring the view change.")
36443645
return
36453646

36463647
# Just grab bounding box

0 commit comments

Comments
 (0)