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

Skip to content

Commit b6b0ea2

Browse files
committed
AnchoredDirectionArrows: PEP8
1 parent 5fde65a commit b6b0ea2

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples/axes_grid1/demo_anchored_direction_arrows.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,28 @@
44
import matplotlib.font_manager as fm
55

66
fig, ax = plt.subplots()
7-
ax.imshow(np.random.random((10,10)))
7+
ax.imshow(np.random.random((10, 10)))
88

99
# Simple example
10-
simple_arrow = AnchoredDirectionArrows(ax.transAxes, 'X','Y')
10+
simple_arrow = AnchoredDirectionArrows(ax.transAxes, 'X', 'Y')
1111
ax.add_artist(simple_arrow)
1212

1313
# High contrast arrow
1414
high_contrast_part_1 = AnchoredDirectionArrows(
1515
ax.transAxes,
1616
'111', r'11$\overline{2}$',
1717
loc=1,
18-
arrow_props={'ec':'w','fc':'none','alpha':1,'lw':2}
18+
arrow_props={'ec': 'w', 'fc': 'none', 'alpha': 1,
19+
'lw': 2}
1920
)
2021
ax.add_artist(high_contrast_part_1)
2122

2223
high_contrast_part_2 = AnchoredDirectionArrows(
2324
ax.transAxes,
2425
'111', r'11$\overline{2}$',
2526
loc=1,
26-
arrow_props={'ec':'none','fc':'k'},
27-
text_props={'ec':'w','fc':'k','lw':0.4}
27+
arrow_props={'ec': 'none', 'fc': 'k'},
28+
text_props={'ec': 'w', 'fc': 'k', 'lw': 0.4}
2829
)
2930
ax.add_artist(high_contrast_part_2)
3031

@@ -46,7 +47,7 @@
4647
ax.transAxes, 'A', 'B', loc='lower center',
4748
length=-0.15,
4849
sep_x=0.03, sep_y=0.03,
49-
color = 'r'
50+
color='r'
5051
)
5152
ax.add_artist(a1)
5253

lib/mpl_toolkits/tests/test_axes_grid1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from mpl_toolkits.axes_grid1 import AxesGrid
1313
from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes, mark_inset
1414
from mpl_toolkits.axes_grid1.anchored_artists import (AnchoredSizeBar,
15-
AnchoredDirectionArrows)
15+
AnchoredDirectionArrows)
1616

1717
from matplotlib.colors import LogNorm
1818
from itertools import product

0 commit comments

Comments
 (0)