【发布时间】:2020-08-27 18:51:18
【问题描述】:
总的来说,我对 Matplotlib 和 python 非常陌生,并且想显示一个带有颜色图的散点图,例如hot 对应图例。
我的数据设置为两个列表列表(x_list 和 y_list),每个长度为 100。
for i in x_list:
x_list[i] = # list of data corresponding to a function where T = i
我有一个这样的情节,其中每种颜色都是 T 的值:
for T in range(100):
x = x_list[T]
y = y_list[T]
plt.scatter(x, y, label="T{}".format(T))
理想情况下,我希望它在 seaborn 模块中看起来像这样
根据 T 的值,分配给每个点的颜色是颜色图渐变。
我可以用 Matplotlib 中的颜色图 cm 做到这一点吗?
【问题讨论】:
标签: python matplotlib