()
| 5916 | |
| 5917 | @image_comparison(['mixed_collection'], remove_text=True, style='_classic_test') |
| 5918 | def test_mixed_collection(): |
| 5919 | # First illustrate basic pyplot interface, using defaults where possible. |
| 5920 | fig, ax = plt.subplots() |
| 5921 | |
| 5922 | c = mpatches.Circle((8, 8), radius=4, facecolor='none', edgecolor='green') |
| 5923 | |
| 5924 | # PDF can optimize this one |
| 5925 | p1 = mpl.collections.PatchCollection([c], match_original=True) |
| 5926 | p1.set_offsets([[0, 0], [24, 24]]) |
| 5927 | p1.set_linewidths([1, 5]) |
| 5928 | |
| 5929 | # PDF can't optimize this one, because the alpha of the edge changes |
| 5930 | p2 = mpl.collections.PatchCollection([c], match_original=True) |
| 5931 | p2.set_offsets([[48, 0], [-32, -16]]) |
| 5932 | p2.set_linewidths([1, 5]) |
| 5933 | p2.set_edgecolors([[0, 0, 0.1, 1.0], [0, 0, 0.1, 0.5]]) |
| 5934 | |
| 5935 | ax.patch.set_color('0.5') |
| 5936 | ax.add_collection(p1) |
| 5937 | ax.add_collection(p2) |
| 5938 | |
| 5939 | ax.set_xlim(0, 16) |
| 5940 | ax.set_ylim(0, 16) |
| 5941 | |
| 5942 | |
| 5943 | def test_subplot_key_hash(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…