| 191 | |
| 192 | @image_comparison(['path_clipping.svg'], remove_text=True, style='_classic_test') |
| 193 | def test_path_clipping(): |
| 194 | fig = plt.figure(figsize=(6.0, 6.2)) |
| 195 | |
| 196 | for i, xy in enumerate([ |
| 197 | [(200, 200), (200, 350), (400, 350), (400, 200)], |
| 198 | [(200, 200), (200, 350), (400, 350), (400, 100)], |
| 199 | [(200, 100), (200, 350), (400, 350), (400, 100)], |
| 200 | [(200, 100), (200, 415), (400, 350), (400, 100)], |
| 201 | [(200, 100), (200, 415), (400, 415), (400, 100)], |
| 202 | [(200, 415), (400, 415), (400, 100), (200, 100)], |
| 203 | [(400, 415), (400, 100), (200, 100), (200, 415)]]): |
| 204 | ax = fig.add_subplot(4, 2, i+1) |
| 205 | bbox = [0, 140, 640, 260] |
| 206 | ax.set_xlim(bbox[0], bbox[0] + bbox[2]) |
| 207 | ax.set_ylim(bbox[1], bbox[1] + bbox[3]) |
| 208 | ax.add_patch(Polygon( |
| 209 | xy, facecolor='none', edgecolor='red', closed=True)) |
| 210 | |
| 211 | |
| 212 | @image_comparison(['semi_log_with_zero.png'], style='mpl20') |