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
Re-use axis on a sns.jointplot() ? #294
Comments
Ah, you definitely can add stuff to plots made with figure-level functions, you just have to do so after calling them. In the case of |
Right. I can add a plot, but it doesn't generate all the bells and whistles that jointplot does. I want to get something like the figure 3 in this paper. I was going to worry about the contour aspect of the plot afterwards. Thanks for the quick reply! I closed this by mistake. I'm sorry. |
I think in your case I'd do something like this using the tips dataset as an example: tips = sns.load_dataset("tips")
g = sns.JointGrid("total_bill", "tip", tips)
for day, day_tips in tips.groupby("day"):
sns.kdeplot(day_tips["total_bill"], ax=g.ax_marg_x, legend=False)
sns.kdeplot(day_tips["tip"], ax=g.ax_marg_y, vertical=True, legend=False)
g.ax_joint.plot(day_tips["total_bill"], day_tips["tip"], "o", ms=5) Requires a little more work on your end than just using |
Perfect! It works great!!! I'll send you an e-mail with my plot. Thank you so much for the quick responses! I'm at a conference with Fernando Perez. He said he'll see you soon and I asked him to thank you in person. ;) |
Hi,
I'm trying to plot something like this example. I'd like to add two other distributions to the same plot. But I don't think I can since jointplot is a figure-level function. It would be nice to able to, though. Keep up the great work with Seaborn!
Cheers,
Caroline
The text was updated successfully, but these errors were encountered: