我看到使用(.circle)的图,但是根据您可能想做的事情,您也可以尝试以下操作:
import matplotlib.pyplot as plt
import numpy as np
x = list(range(1,6))
y = list(range(10, 20, 2))
print(x, y)
for i, data in enumerate(zip(x,y)):
j, k = data
plt.scatter(j,k, marker = "o", s = ((i+1)**4)*50, alpha = 0.3)
centers = np.array([[5,18], [3,14], [7,6]])
m, n = make_blobs(n_samples=20, centers=[[5,18], [3,14], [7,6]], n_features=2,
cluster_std = 0.4)
colors = ['g', 'b', 'r', 'm']
plt.figure(num=None, figsize=(7,6), facecolor='w', edgecolor='k')
plt.scatter(m[:,0], m[:,1])
for i in range(len(centers)):
plt.scatter(centers[i,0], centers[i,1], color = colors[i], marker = 'o', s = 13000, alpha = 0.2)
plt.scatter(centers[i,0], centers[i,1], color = 'k', marker = 'x', s = 50)
plt.savefig('plot.png')