Python, matplotlib, グラフの色の指定

グラフの色の指定方法。 次の8色は1文字で指定可。

b: blue/青
g: green/緑
r: red/赤
c: cyan/シアン
m: magenta/マゼンダ
y: yellow/黄
k: black/黒
w: white/白

aaaaaとかでも指定可。

In [2]: import matplotlib.pyplot as plt

In [3]: import pandas as pd

In [4]: import numpy as np

In [5]: df = pd.DataFrame(np.random.randn(10,2))

In [7]: plt.plot(df[0],df[1],c='b')
Out[7]: [<matplotlib.lines.Line2D at 0x2aeb43282a90>]

In [8]: plt.show()

マニュアル