|
4 | 4 | import matplotlib.font_manager as fm |
5 | 5 |
|
6 | 6 | fig, ax = plt.subplots() |
7 | | -ax.imshow(np.random.random((10,10))) |
| 7 | +ax.imshow(np.random.random((10, 10))) |
8 | 8 |
|
9 | 9 | # Simple example |
10 | | -simple_arrow = AnchoredDirectionArrows(ax.transAxes, 'X','Y') |
| 10 | +simple_arrow = AnchoredDirectionArrows(ax.transAxes, 'X', 'Y') |
11 | 11 | ax.add_artist(simple_arrow) |
12 | 12 |
|
13 | 13 | # High contrast arrow |
14 | 14 | high_contrast_part_1 = AnchoredDirectionArrows( |
15 | 15 | ax.transAxes, |
16 | 16 | '111', r'11$\overline{2}$', |
17 | 17 | 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} |
19 | 20 | ) |
20 | 21 | ax.add_artist(high_contrast_part_1) |
21 | 22 |
|
22 | 23 | high_contrast_part_2 = AnchoredDirectionArrows( |
23 | 24 | ax.transAxes, |
24 | 25 | '111', r'11$\overline{2}$', |
25 | 26 | 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} |
28 | 29 | ) |
29 | 30 | ax.add_artist(high_contrast_part_2) |
30 | 31 |
|
|
46 | 47 | ax.transAxes, 'A', 'B', loc='lower center', |
47 | 48 | length=-0.15, |
48 | 49 | sep_x=0.03, sep_y=0.03, |
49 | | - color = 'r' |
| 50 | + color='r' |
50 | 51 | ) |
51 | 52 | ax.add_artist(a1) |
52 | 53 |
|
|
0 commit comments