Skip to content

Commit ab58bef

Browse files
committed
Cleanup some doctest wrapping.
1 parent 0f9e5f9 commit ab58bef

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

lib/matplotlib/ticker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,9 +1420,9 @@ def tick_values(self, vmin, vmax):
14201420
automatically for the associated :attr:`axis` simply call
14211421
the Locator instance::
14221422
1423-
>>> print((type(loc)))
1423+
>>> print(type(loc))
14241424
<type 'Locator'>
1425-
>>> print((loc()))
1425+
>>> print(loc())
14261426
[1, 2, 3, 4]
14271427
14281428
"""

lib/mpl_toolkits/axes_grid1/anchored_artists.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ def __init__(self, transform, size, label, loc,
321321
--------
322322
>>> import matplotlib.pyplot as plt
323323
>>> import numpy as np
324-
>>> from mpl_toolkits.axes_grid1.anchored_artists import \
325-
AnchoredSizeBar
324+
>>> from mpl_toolkits.axes_grid1.anchored_artists import (
325+
... AnchoredSizeBar)
326326
>>> fig, ax = plt.subplots()
327327
>>> ax.imshow(np.random.random((10,10)))
328328
>>> bar = AnchoredSizeBar(ax.transData, 3, '3 data units', 4)
@@ -333,10 +333,10 @@ def __init__(self, transform, size, label, loc,
333333
334334
>>> import matplotlib.font_manager as fm
335335
>>> fontprops = fm.FontProperties(size=14, family='monospace')
336-
>>> bar = AnchoredSizeBar(ax.transData, 3, '3 units', 4, pad=0.5, \
337-
sep=5, borderpad=0.5, frameon=False, \
338-
size_vertical=0.5, color='white', \
339-
fontproperties=fontprops)
336+
>>> bar = AnchoredSizeBar(ax.transData, 3, '3 units', 4, pad=0.5,
337+
... sep=5, borderpad=0.5, frameon=False,
338+
... size_vertical=0.5, color='white',
339+
... fontproperties=fontprops)
340340
"""
341341
if fill_bar is None:
342342
fill_bar = size_vertical > 0
@@ -519,9 +519,11 @@ def __init__(self, transform, label_x, label_y, length=0.15,
519519
>>> import matplotlib.font_manager as fm
520520
>>> fontprops = fm.FontProperties(family='monospace')
521521
>>> arrows = AnchoredDirectionArrows(ax.transAxes, 'East', 'South',
522-
... loc='lower left', color='k', aspect_ratio=-1, sep_x=0.02,
523-
... sep_y=-0.01, text_props={'ec':'w', 'fc':'k'},
524-
... fontproperties=fontprops)
522+
... loc='lower left', color='k',
523+
... aspect_ratio=-1, sep_x=0.02,
524+
... sep_y=-0.01,
525+
... text_props={'ec':'w', 'fc':'k'},
526+
... fontproperties=fontprops)
525527
"""
526528
if arrow_props is None:
527529
arrow_props = {}

0 commit comments

Comments
 (0)