You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jointplot (or JointGrid in general) leaves ax_marg_y as current axis. Some people try to use plt.xlim() or similar and are changing the marginal subplot instead of the main one. It could be nice to automatically set plt.sca(g.ax_joint) when finishing the jointplot.
Example code:
import matplotlib.pyplot as plt
import seaborn as sns
tips = sns.load_dataset('tips')
g = sns.jointplot(data=tips, x='total_bill', y='tip')
# plt.sca(g.ax_joint)
plt.axhline(tips['tip'].mean(), ls='--', c='r')
plt.axhspan(tips['tip'].quantile(.25), tips['tip'].quantile(.75), color='y', alpha=.3)
plt.show()