如何将Seaborn的FacetGrid保存在多页pdf文件中?

时间:2019-02-20 21:36:07

标签: python matplotlib seaborn facet-grid

我已经编写了以下代码,以使用seaborn的FacetGrid(sns.lmplot)绘制多个图形。将图形保存为pdf格式将得到1页pdf文件。我想知道是否有人可以帮助我每页仅显示3行和4列,并且也将它们全部绘制在具有多个页面的pdf中?

import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline

g = sns.lmplot('index','value',data=merged, col="station", hue="flow type",col_wrap=3,height=2,aspect=2,legend_out=False,fit_reg=False,sharex=False,sharey=False)
#g.savefig('50%_flow_duration_curves_cariboo.pdf', format='png', dpi=1000)


g.set_xlabels("exceedence %")
g.set_ylabels("flow")

这是现在的样子: enter image description here

0 个答案:

没有答案