如何在熊猫子图中使线条更粗

axm*_*302 4 python matplotlib pandas

我正在使用熊猫在单个图中绘制3个子图。下面的代码完成了此任务。但是,我无法使子图中的数据线变粗。有人知道该怎么做吗?

## setup 3 dataframes
t_index=pd.date_range('1/1/2000', periods=10);
df_1 = DataFrame(np.random.randn(10, 4), index=t_index, columns=['A', 'B', 'C', 'D']);
df_2 = DataFrame(np.random.randn(10, 4), index=t_index, columns=['E', 'F', 'G', 'H']);
df_3 = DataFrame(np.random.randn(10, 4), index=t_index, columns=['I', 'J', 'K', 'L']);

##Setup Figure and add subplots
fig, axes = plt.subplots(3, 1, figsize=(6, 6))
plt.subplots_adjust(wspace=0.5, hspace=0.5);
target1 = axes[0]
target2 = axes[1]
target3 = axes[2]

df_1.plot(ax=target1)
df_2.plot(ax=target2)
df_3.plot(ax=target3)
Run Code Online (Sandbox Code Playgroud)

Ale*_*der 6

指定线宽(lw)参数:

df_3.plot(ax=target3, lw=4)
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明