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

More contour level fixes #73

Merged
merged 1 commit into from
Jan 15, 2016
Merged

More contour level fixes #73

merged 1 commit into from
Jan 15, 2016

Conversation

zblz
Copy link
Contributor

@zblz zblz commented Jan 13, 2016

So in #70 I missed a few cases that were not covered by the tests. When the number of counts is (very) low and there are contours around single counts, the contour levels will be duplicated. However, matplotlib now complains if the levels are not strictly increasing, so it throws the same error as in #68.

I found this while doing travis testing on very small chains to test code paths rather than actual data. The analysis of these small chains is obviously absurd, but corner should still not fail.

I have added a few hacks that move the contour levels by up to a factor 1e-4 when they are duplicated. This is not strictly correct, but if the levels are duplicated the plot is probably bad enough that just care about it not failing. I also added three tests that will fail without this PR's changes.

@dfm dfm merged commit 0f2e8df into dfm:master Jan 15, 2016
dfm added a commit that referenced this pull request Jan 15, 2016
@dfm
Copy link
Owner

dfm commented Jan 15, 2016

Thanks!

@zblz
Copy link
Contributor Author

zblz commented Jan 15, 2016

With the modifications you made some of the tests can still fail because in line 577 there is a call to plt.contourf with levels np.concatenate([[0], V, [H.max()]]), and V[-1] and H.max() can still be the same number. You should add the 1+1e-4 factor for H.max() there.

@dfm
Copy link
Owner

dfm commented Jan 15, 2016

Done. I'm cool with that.

dfm added a commit that referenced this pull request Jan 15, 2016
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

Successfully merging this pull request may close these issues.

2 participants