()
| 160 | @image_comparison(['arrow_styles.png'], style='mpl20', remove_text=True, |
| 161 | tol=0 if platform.machine() == 'x86_64' else 0.02) |
| 162 | def test_arrow_styles(): |
| 163 | styles = mpatches.ArrowStyle.get_styles() |
| 164 | |
| 165 | n = len(styles) |
| 166 | fig, ax = plt.subplots(figsize=(8, 8)) |
| 167 | ax.set_xlim(0, 1) |
| 168 | ax.set_ylim(-1, n) |
| 169 | fig.subplots_adjust(left=0, right=1, bottom=0, top=1) |
| 170 | |
| 171 | for i, stylename in enumerate(sorted(styles)): |
| 172 | patch = mpatches.FancyArrowPatch((0.1 + (i % 2)*0.05, i), |
| 173 | (0.45 + (i % 2)*0.05, i), |
| 174 | arrowstyle=stylename, |
| 175 | mutation_scale=25) |
| 176 | ax.add_patch(patch) |
| 177 | |
| 178 | for i, stylename in enumerate([']-[', ']-', '-[', '|-|']): |
| 179 | style = stylename |
| 180 | if stylename[0] != '-': |
| 181 | style += ',angleA=ANGLE' |
| 182 | if stylename[-1] != '-': |
| 183 | style += ',angleB=ANGLE' |
| 184 | |
| 185 | for j, angle in enumerate([-30, 60]): |
| 186 | arrowstyle = style.replace('ANGLE', str(angle)) |
| 187 | patch = mpatches.FancyArrowPatch((0.55, 2*i + j), (0.9, 2*i + j), |
| 188 | arrowstyle=arrowstyle, |
| 189 | mutation_scale=25) |
| 190 | ax.add_patch(patch) |
| 191 | |
| 192 | |
| 193 | @image_comparison(['connection_styles.png'], style='mpl20', remove_text=True, |
nothing calls this directly
no test coverage detected
searching dependent graphs…