【4.3】seaborn一页多图subplots

一、subplots

subplots具体用法参见matplotlib部分

import matplotlib.pyplot as plt

fig, axs = plt.subplots(ncols=3)

sns.regplot(x='value', y='wage', data=df_melt, ax=axs[0])
sns.regplot(x='value', y='wage', data=df_melt, ax=axs[1])
sns.boxplot(x='education',y='wage', data=df_melt, ax=axs[2])
fig.savefig('tmp.jpeg')

参考资料

药企,独角兽,苏州。团队长期招人,感兴趣的都可以发邮件聊聊:tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn