MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / make_matplotlib_icon

Function make_matplotlib_icon

tools/make_icons.py:64–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def 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
91icon_defs = [

Callers 1

make_iconsFunction · 0.85

Calls 10

figureMethod · 0.80
add_axesMethod · 0.80
set_axisbelowMethod · 0.80
set_yticksMethod · 0.80
set_rmaxMethod · 0.80
set_alphaMethod · 0.45
barMethod · 0.45
set_facecolorMethod · 0.45
tick_paramsMethod · 0.45
gridMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…