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

Skip to content

Commit 6ec4f8f

Browse files
committed
AnchoredDirectionArrows: Docstring, what's new
1 parent 19f4a38 commit 6ec4f8f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

doc/users/next_whats_new/anchored_direction_arrows.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ system (typically ax.transAxes), and arrow labels. There are several optional
99
parameters that can be used to alter layout. For example, the arrow pairs can
1010
be rotated and the color can be changed. By default the labels and arrows have
1111
the same color, but the class may also pass arguments for costumizing arrow
12-
and text layout, these are passed to :class: `matplotlib.text.TextPath` and
13-
`matplotlib.patches.FancyArrowPatch`. Location, arrow lenght, width and head
14-
can be adjusted, the the direction arrows and labels can have a frame. Padding
15-
and separation parameters can be adjusted.
12+
and text layout, these are passed to :class:`matplotlib.text.TextPath` and
13+
`matplotlib.patches.FancyArrowPatch`. Location, length and width for both
14+
arrow tail and head can be adjusted, the the direction arrows and labels can
15+
have a frame. Padding and separation parameters can be adjusted.

lib/mpl_toolkits/axes_grid1/anchored_artists.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ def __init__(self, transform, label_x, label_y, length=0.15,
476476
Defaults to 2.
477477
478478
text_props, arrow_props : dict
479-
Properties of the text and arrows, passed to :class:
480-
`matplotlib.text.TextPath` and
479+
Properties of the text and arrows, passed to
480+
:class:`matplotlib.text.TextPath` and
481481
`matplotlib.patches.FancyArrowPatch`
482482
483483
**kwargs :
@@ -509,11 +509,10 @@ def __init__(self, transform, label_x, label_y, length=0.15,
509509
>>> import matplotlib.pyplot as plt
510510
>>> import numpy as np
511511
>>> from mpl_toolkits.axes_grid1.anchored_artists import \
512-
AnchoredDirectionArrows
512+
... AnchoredDirectionArrows
513513
>>> fig, ax = plt.subplots()
514514
>>> ax.imshow(np.random.random((10,10)))
515-
>>> arrows = AnchoredDirectionArrows(ax.transAxes, '111', \
516-
r'11$\overline{2}$')
515+
>>> arrows = AnchoredDirectionArrows(ax.transAxes, '111', '110')
517516
>>> ax.add_artist(arrows)
518517
>>> fig.show()
519518
@@ -522,9 +521,10 @@ def __init__(self, transform, label_x, label_y, length=0.15,
522521
523522
>>> import matplotlib.font_manager as fm
524523
>>> fontprops = fm.FontProperties(family='monospace')
525-
>>> arrows = AnchoredDirectionArrows(ax.transAxes,'East','South', \
526-
loc='lower left', color='k', aspect_ratio=-1, sep_x=0.02,sep_y=-0.01, \
527-
text_props={'ec':'w','fc':'k'}, fontproperties=fontprops)
524+
>>> arrows = AnchoredDirectionArrows(ax.transAxes, 'East', 'South',
525+
... loc='lower left', color='k', aspect_ratio=-1, sep_x=0.02,
526+
... sep_y=-0.01, text_props={'ec':'w', 'fc':'k'},
527+
... fontproperties=fontprops)
528528
"""
529529
if arrow_props is None:
530530
arrow_props = {}

0 commit comments

Comments
 (0)