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

Skip to content

Commit 0f9e5f9

Browse files
committed
Fix incorrect doctest syntax.
1 parent e8120cf commit 0f9e5f9

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ def plot(self, *args, scalex=True, scaley=True, **kwargs):
11471147
11481148
>>> plot(x, y, 'go--', linewidth=2, markersize=12)
11491149
>>> plot(x, y, color='green', marker='o', linestyle='dashed',
1150-
linewidth=2, markersize=12)
1150+
... linewidth=2, markersize=12)
11511151
11521152
When conflicting with *fmt*, keyword arguments take precedence.
11531153

lib/matplotlib/dviread.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ class Dvi(object):
177177
file upon exit. Pages can be read via iteration. Here is an overly
178178
simple way to extract text without trying to detect whitespace::
179179
180-
>>> with matplotlib.dviread.Dvi('input.dvi', 72) as dvi:
181-
>>> for page in dvi:
182-
>>> print(''.join(chr(t.glyph) for t in page.text))
180+
>>> with matplotlib.dviread.Dvi('input.dvi', 72) as dvi:
181+
... for page in dvi:
182+
... print(''.join(chr(t.glyph) for t in page.text))
183183
"""
184184
# dispatch table
185185
_dtable = [None] * 256

lib/matplotlib/widgets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,10 +1714,10 @@ class SpanSelector(_SelectorWidget):
17141714
>>> fig, ax = plt.subplots()
17151715
>>> ax.plot([1, 2, 3], [10, 50, 100])
17161716
>>> def onselect(vmin, vmax):
1717-
print(vmin, vmax)
1717+
... print(vmin, vmax)
17181718
>>> rectprops = dict(facecolor='blue', alpha=0.5)
17191719
>>> span = mwidgets.SpanSelector(ax, onselect, 'horizontal',
1720-
rectprops=rectprops)
1720+
... rectprops=rectprops)
17211721
>>> fig.show()
17221722
17231723
See also: :doc:`/gallery/widgets/span_selector`

lib/mpl_toolkits/axes_grid1/anchored_artists.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ def __init__(self, transform, label_x, label_y, length=0.15,
505505
--------
506506
>>> import matplotlib.pyplot as plt
507507
>>> import numpy as np
508-
>>> from mpl_toolkits.axes_grid1.anchored_artists import \
509-
... AnchoredDirectionArrows
508+
>>> from mpl_toolkits.axes_grid1.anchored_artists import (
509+
... AnchoredDirectionArrows)
510510
>>> fig, ax = plt.subplots()
511511
>>> ax.imshow(np.random.random((10,10)))
512512
>>> arrows = AnchoredDirectionArrows(ax.transAxes, '111', '110')

0 commit comments

Comments
 (0)