简体   繁体   English

绘制两种不同类型的图(Seaborn,FacetGrid)

[英]Plotting two different kind of plots next to each other (Seaborn, FacetGrid)

So I have been working on a dataset and have to plots which I would like to plot next to each other with Seaborn.因此,我一直在研究数据集,并且必须将 plot 与 Seaborn 相邻绘制。 Unfortunately, using the FacetGrid function I am only able to plot the same kind next to each other.不幸的是,使用 FacetGrid function 我只能将 plot 同类相邻。

I hope you guys can help me solve my problem and thank you in advance我希望你们能帮我解决我的问题,并提前谢谢你们

第一个情节 [ [第二个情节[2]

Don't use catplot() which is a figure-level function that creates a new FacetGrid each time, instead use the underlying axes-level functions barplot() and pointplot()不要使用catplot() ,它是一个图形级 function ,每次都会创建一个新的 FacetGrid ,而是使用底层轴级函数barplot()pointplot()

ie: IE:

fig, (ax1, ax2) = plt.subplots(1,2)
sns.barplot(..., ax=ax1)
sns.pointplot(..., ax=ax2)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM