()
| 62 | |
| 63 | |
| 64 | def make_matplotlib_icon(): |
| 65 | fig = plt.figure(figsize=(1, 1)) |
| 66 | fig.patch.set_alpha(0.0) |
| 67 | ax = fig.add_axes((0.025, 0.025, 0.95, 0.95), projection='polar') |
| 68 | ax.set_axisbelow(True) |
| 69 | |
| 70 | N = 7 |
| 71 | arc = 2 * np.pi |
| 72 | theta = np.arange(0, arc, arc / N) |
| 73 | radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8]) |
| 74 | width = np.pi / 4 * np.array([0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3]) |
| 75 | bars = ax.bar(theta, radii, width=width, bottom=0.0, linewidth=1, |
| 76 | edgecolor='k') |
| 77 | |
| 78 | for r, bar in zip(radii, bars): |
| 79 | bar.set_facecolor(mpl.cm.jet(r / 10)) |
| 80 | |
| 81 | ax.tick_params(labelleft=False, labelright=False, |
| 82 | labelbottom=False, labeltop=False) |
| 83 | ax.grid(lw=0.0) |
| 84 | |
| 85 | ax.set_yticks(np.arange(1, 9, 2)) |
| 86 | ax.set_rmax(9) |
| 87 | |
| 88 | return fig |
| 89 | |
| 90 | |
| 91 | icon_defs = [ |
no test coverage detected
searching dependent graphs…