New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JointGrid could have axhline/axvline analogues that would plot on joint and marginal axes #2249
Comments
Do you mean something like this? I added a JointGrid.plot_refline(self, *, value, orient, joint=True, marginal=True, **kwargs) It would be called like this: import seaborn as sns
penguins = sns.load_dataset('penguins')
g = sns.jointplot(data=penguins, x='bill_length_mm', y='bill_depth_mm')
# by default plot on both the marginal and joint axes
g.plot_refline(value=16, orient='h', linestyle='dashed', color='gray')
# only on joint
g.plot_refline(value=45, orient='v', marginal=False, linestyle='dotted', color='red')
# only on marginal
g.plot_refline(value=55, orient='v', joint=False, linestyle='dashed', color='blue') I'm happy to make the PR if this is indeed what you meant. |
Yes, basically. But I think I would prefer the following API: JointGrid.refline(self, x: float | None = None, y: float | None = None, **line_kws) I'm ambivalent about having |
Sure, I'll update the API to what you mentioned. With regards to the |
Would need to thing about the right name, but probably a good idea.
The text was updated successfully, but these errors were encountered: