更新时间:2023-02-20 14:34:02
仅更改散点图的数据怎么办?
What about just changing the data of your scatter plot?
# save an empty scatter plot
scat = plt.scatter([], [], s=2.5, alpha=1, color=c, edgecolors='none')
for each set in sets:
# The data needs to be written as [(x1, y1), (x2, y2), ...]
scat.set_offsets([xy for xy in zip(x, y)])
plt.savefig("...")