我应该如何使用matplotlib制作类似于上图的估计线。
我有几个点,使用以下代码在matplotlib中对它们进行了绘制:
我有几个点,使用以下代码在matplotlib中对它们进行了绘制:
import matplotlib.pyplot as plt
for smp, lbl in zip(samples, labels):
plt.scatter(smp[0], smp[1], marker='*', cl = 'b', s=100, label=lbl)
# set limit, xlabel, ylabel, legend ...
# ...
plt.show()
Thanks,
x = [value[0] for value in samples]
y = [value[1] for value in samples]
- MaxNoe