You can get axes with?g.ax_joint?and from here your can set you axis attributes.
plt.figure(figsize=(10, 8))
g = sns.JointGrid(x="u", y="t", data=tdata)
g.plot(sns.scatterplot, sns.histplot)
g.ax_joint.tick_params(axis="x", rotation=90)
plt.show()
plt.figure(figsize=(10, 8))
g = sns.JointGrid(x="u", y="t", data=tdata)
g.plot(sns.scatterplot, sns.histplot)
g.ax_joint.set_xticklabels(g.ax_joint.get_xticks(), rotation=45)
plt.show()
With this you can iterate over all the ticks and change their rotation individually.
plt.figure(figsize=(10, 8))
g = sns.JointGrid(x="u", y="t", data=tdata)
g.plot(sns.scatterplot, sns.histplot)
for tick in g.ax_joint.get_xticklabels():
tick.set_rotation(30)
plt.show()
参考:
seaborn JointGrid can't rotation the xtick? - Stack Overflow
Rotate axis text in python matplotlib - Stack Overflow
?Seaborn双变量分布jointplot的坐标轴标签设置_dta0502的博客-CSDN博客
|