Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how does one make lines thicker in pandas subplots

I am using pandas to plot 3 subplots in a single figure. The code below accomplishes this. However, I am having trouble making the data lines in the subplots thicker. Anybody know how to do this?

## 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)
like image 607
axm302 Avatar asked Dec 30 '15 20:12

axm302


1 Answers

Specify a line width (lw) parameter:

df_3.plot(ax=target3, lw=4)

enter image description here

like image 142
Alexander Avatar answered Oct 15 '22 11:10

Alexander