如何摆脱Seaborn中mainplot下的地块?

时间:2019-06-02 14:47:20

标签: matplotlib plot seaborn

试图用Seaborn绘制线性回归图,我最终遇到了这个问题:

first part of the plot

,然后在这些空图下: first extra (non-needed) plot - second part under main 3 subplots second extra (non-needed) plot - second part under main 3 subplots third extra (non-needed) plot - second part under main 3 subplots

我不需要最后三个小子图,或者至少不需要如何正确绘制它们,而主要的前三个子图在上面?

这是我使用的代码:

fig, axes = plt.subplots(3, 1, figsize=(12, 15))

for col, ax in zip(['gross_sqft_thousands','land_sqft_thousands','total_units'], axes.flatten()):
    ax.tick_params(axis='x', rotation=85)
    ax.set_ylabel(col, fontsize=15)
    sns.jointplot(x="sale_price_millions", y=col, data=clean_df, kind='reg', joint_kws={'line_kws':{'color':'cyan'}}, ax=ax) 

fig.suptitle('Sale Price vs Continuous Variables', position=(.5,1.02), fontsize=20)
fig.tight_layout()
fig.show()

0 个答案:

没有答案