Код
import matplotlib.patches as ptc
import matplotlib.pyplot as plt
import numpy as np
= 5
n_circles
= np.linspace(0, 2 * np.pi, n_circles + 1)
angle = np.cos(angle)
X = np.sin(angle)
Y
= 'rainbow'
cmap_name = plt.colormaps[cmap_name].resampled(n_circles)
cmap = cmap(np.arange(0, n_circles))
colors
cmap
= 1.5
radius = 0.5
alpha
= [
circles =alpha, color=c) for x, y, c in zip(X, Y, colors)
ptc.Circle((x, y), radius, alpha
]
= plt.subplots()
fig, ax
for cir in circles:
ax.add_artist(cir)
= np.array([-1, 1, -1, 1])
range_
1.05 * range_ + radius * np.sign(range_))
plt.axis('off')
plt.axis(=1)
ax.set_aspect(aspect
'assets/logo.svg', bbox_inches='tight', pad_inches=0) fig.savefig(