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

BUG: colorbar autoscaling now ensures a finite range of values #2858

Merged
merged 1 commit into from Mar 3, 2014

Conversation

efiring
Copy link
Member

@efiring efiring commented Mar 3, 2014

Closes #2642.

@@ -194,6 +194,20 @@ def test_gridspec_make_colorbar():

plt.subplots_adjust(top=0.95, right=0.95, bottom=0.2, hspace=0.25)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing line here (and maybe under it too).

@tacaswell tacaswell added this to the v1.4.0 milestone Mar 3, 2014
@efiring
Copy link
Member Author

efiring commented Mar 3, 2014

@tacaswell, I added the blank lines and force-pushed. Travis is happy.

tacaswell added a commit that referenced this pull request Mar 3, 2014
BUG: colorbar autoscaling now ensures a finite range of values
@tacaswell tacaswell merged commit 9fea430 into matplotlib:master Mar 3, 2014
@tacaswell
Copy link
Member

Thanks. There is (was?) another similar issue with the auto-range on hexbin.

It looks like the bulk of the work is done by the call to mtrans.nonsingular ?

@efiring
Copy link
Member Author

efiring commented Mar 3, 2014

@tacaswell, Yes, nonsingular is doing everything here, and this is exactly what it was designed for. A quick search did not turn up a github issue regarding this problem on hexbin. It looks like the identical problem would have occurred, but now does not:

plt.hexbin([1], [1])
plt.colorbar()

does about what I would now expect.

@efiring efiring deleted the colorbar_one_value branch March 3, 2014 22:59
@tacaswell
Copy link
Member

https://stackoverflow.com/questions/14780362/is-it-possible-to-plot-a-list-of-identical-points-on-a-matplotlib-hexbin-plot/14783796

Sorry I was not super clear on which auto-scaling I was talking about, the issue is in picking the extent of the bins.

@efiring
Copy link
Member Author

efiring commented Mar 4, 2014

Ah, yes. It looks like that needs a similar treatment, and a new github issue.

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.

FloatingPointError exception in figure.colorbar
2 participants