【发布时间】:2016-05-15 09:08:19
【问题描述】:
我正在使用 matplotlibs ggplot 样式进行绘图,并且只想覆盖特定的标准参数,例如 xticklabels 的颜色、网格背景颜色和线宽。
import numpy as np
import pandas as pd
import matplotlib
# changing matplotlib the default style
matplotlib.style.use('ggplot')
# dataframe plot
df = pd.DataFrame(np.random.randn(36, 3))
df.plot()
我知道我可以像这样为轴对象设置单个属性:
ax.set_axis_bgcolor('red')
但是我怎样才能覆盖默认属性(例如标签颜色、背景颜色和线宽以将它们放在所有图中?
提前致谢!
【问题讨论】:
标签: python pandas matplotlib python-ggplot