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

multiple sets of points #69

Open
davidwhogg opened this issue Jan 10, 2016 · 5 comments
Open

multiple sets of points #69

davidwhogg opened this issue Jan 10, 2016 · 5 comments

Comments

@davidwhogg
Copy link
Collaborator

I have K sets of points, each of which is a large number N_k of objects in D dimensions. I want to plot these all on the same corner plot in different colors. How do I do that? I am happy to write the patch.

@dfm
Copy link
Owner

dfm commented Jan 10, 2016

This is possible. You can use a combination of the color and fig kwargs.

fig = corner.corner(samps1, color="k")
corner.corner(samps2, color="g", fig=fig)

@davidwhogg
Copy link
Collaborator Author

You are absolutely right. Sorry to waste issue space.

(I'm closing but I should open a pull request to the tutorial...)

@davidwhogg
Copy link
Collaborator Author

I am reopening this. Here is my code (100000 data points, 16 centers) I want to plot the centers as red dots on top of blue data. This doesn't work (I get red one-d histograms but no red points on the blue plots), and if I do the other order I also don't see the red points. What am I doing wrong? Full code checked in at Platypus.

        figure = corner.corner(data, range=ranges, labels=labels, color="b",
                               bins=128, plot_datapoints=True, plot_density=True, plot_contours=True)
        corner.corner(centers, range=ranges, color="r", fig=figure,
                      plot_datapoints=True, plot_density=False, plot_contours=False)
        fn = "{}/centers.{}".format(dir, suffix)
        figure.savefig(fn)

@davidwhogg davidwhogg reopened this Jan 12, 2016
@davidwhogg
Copy link
Collaborator Author

ps. python3.5
pps. a zorder keyword might be all I am missing...?

@dfm
Copy link
Owner

dfm commented Jan 12, 2016

Can you post a figure showing your issue? You might need to use something like data_kwargs=dict(ms=10) for the red plot.

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

No branches or pull requests

2 participants