如何在Pandas(Python)中选择要绘制的轴

时间:2021-09-14 23:44:37

How do I select what axes to plot on in pandas?

如何在熊猫中选择要绘制的轴?

For example, if I were graphing a countplot in seaborn, I would have written the following:

例如,如果我在seaborn中绘制一个计数图,我会写下以下内容:

sns.countplot(females_xt, ax = axes[0][0])

sns.countplot(females_xt,ax = axes [0] [0])

However, I'm not sure how to do this with pandas' plotting capabilities. Any help would be appreciated!

但是,我不知道如何用熊猫的绘图功能来做到这一点。任何帮助,将不胜感激!

Thanks

谢谢

如何在Pandas(Python)中选择要绘制的轴

1 个解决方案

#1


1  

It is the same parameter ax in pandas.dataframe.plot like:

它与pandas.dataframe.plot中的参数ax相同,如:

female_xt.plot(kind ='bar',stacked = True,ax=my_ax)

#1


1  

It is the same parameter ax in pandas.dataframe.plot like:

它与pandas.dataframe.plot中的参数ax相同,如:

female_xt.plot(kind ='bar',stacked = True,ax=my_ax)