Skip to content

Get rid of a few unnecessary line continuations in strings. #9476

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 1 commit into from
Oct 19, 2017
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
6 changes: 3 additions & 3 deletions examples/text_labels_and_annotations/autowrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

fig = plt.figure()
plt.axis([0, 10, 0, 10])
t = "This is a really long string that I'd rather have wrapped so that it"\
" doesn't go outside of the figure, but if it's long enough it will go"\
" off the top or bottom!"
t = ("This is a really long string that I'd rather have wrapped so that it "
"doesn't go outside of the figure, but if it's long enough it will go "
"off the top or bottom!")
plt.text(4, 1, t, ha='left', rotation=15, wrap=True)
plt.text(6, 5, t, ha='left', rotation=15, wrap=True)
plt.text(5, 5, t, ha='right', rotation=-15, wrap=True)
Expand Down
9 changes: 4 additions & 5 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ def legend(self, *args, **kwargs):
corner of the legend in axes coordinates (in which case
``bbox_to_anchor`` will be ignored).

bbox_to_anchor : :class:`matplotlib.transforms.BboxBase` instance \
or tuple of floats
bbox_to_anchor : `~.BboxBase` or pair of floats
Specify any arbitrary location for the legend in `bbox_transform`
coordinates (default Axes coordinates).

Expand Down Expand Up @@ -4230,10 +4229,10 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
linewidths : scalar, optional, default is *None*
If *None*, defaults to 1.0.

edgecolors : {'face', 'none', *None*} or mpl color, optional, default\
is 'face'
edgecolors : {'face', 'none', *None*} or color, optional

If 'face', draws the edges in the same color as the fill color.
If 'face' (the default), draws the edges in the same color as the
fill color.

If 'none', no edge is drawn; this can sometimes lead to unsightly
unpainted pixels between the hexagons.
Expand Down
5 changes: 3 additions & 2 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3639,8 +3639,9 @@ def _set_view_from_bbox(self, bbox, direction='in',
xzc + xwidth/2./scl, yzc + ywidth/2./scl]
elif len(bbox) != 4:
# should be len 3 or 4 but nothing else
warnings.warn('Warning in _set_view_from_bbox: bounding box is not a\
tuple of length 3 or 4. Ignoring the view change...')
warnings.warn(
"Warning in _set_view_from_bbox: bounding box is not a tuple "
"of length 3 or 4. Ignoring the view change.")
return

# Just grab bounding box
Expand Down