2014-02-20 193 views
-1

我是matplotlib的新手。 我有这样的代码,绘制一条线Matplotlib设置颜色

plt.plot(linex, liney, 'r') 

我想“R”的转变让我选择的任意RGB值。这似乎是一件容易的事情,我无法自己弄清楚。

回答

2

plt.plot(linex, liney, color = (R,G,B))

,其中R,G,B,从0-> 1

去获得更多选项看到documentation