2024-10-02 22:31:15 发布
网友
我有一个Python的pairplot。我喜欢将x轴和y轴记号(即数字)添加到所有框中。因此,pairplot底部和左侧的记号及其标签将对每个框重复。请看下面的图片
提前谢谢
我所拥有的
我想要什么
您可以设置ax.tick_params()并调整子地块间距
ax.tick_params()
import matplotlib.pyplot as plt import seaborn as sns penguins = sns.load_dataset("penguins") pp = sns.pairplot( penguins, x_vars=["bill_length_mm", "bill_depth_mm", "flipper_length_mm"], y_vars=["bill_length_mm", "bill_depth_mm"], ) for ax in pp.axes.flat: ax.tick_params(axis='both', labelleft=True, labelbottom=True) plt.subplots_adjust(wspace=0.3, hspace=0.3) plt.show()
您可以设置
ax.tick_params()
并调整子地块间距相关问题 更多 >
编程相关推荐