Skip to content
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

Plot two datasets together #130

Open
alessandropeca opened this issue Mar 27, 2020 · 4 comments
Open

Plot two datasets together #130

alessandropeca opened this issue Mar 27, 2020 · 4 comments

Comments

@alessandropeca
Copy link

Is it possible to plot together (with different colors) two different data sets?
I think it could be very useful to show the differences in two datasets.

@dfm
Copy link
Owner

dfm commented Mar 27, 2020

You can do that using the fig argument:

fig = corner.corner(dataset1, ..., color="C0", weights=np.ones(len(dataset1))/len(dataset1))
corner.corner(dataset2, ..., color="C1", fig=fig, weights=np.ones(len(dataset2))/len(dataset2))

If you have different numbers of points you'll need to use the weights argument to re-weight the points to get the same normalization as above, but you can leave that off if they are the same size.

@alessandropeca
Copy link
Author

Thank you!

@maaceroo
Copy link

maaceroo commented Apr 4, 2024

Hi guys,
This is an old one, but since it is not closed, I decided to ask my question here, instead of opening a new issue.
So, I found this feature to be very useful, and I have succeeded in using it. Now, however, I'm interesting in getting a corner plot with, say, two datasets but with different number of (constrained) parameters, e.g., [a,b,c] for one dataset and [b,c] for the other.
So my question is, is there a way to make such a combination? Here is an example of what I have in mind, in case I'm not clear enough with my description above.
cornerplot

Thanks,
Mario AAO

@gabrielastro
Copy link

Hello @maaceroo, @dfm, is there a solution in the meanwhile? I am running into the same need (using corner through species). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants