Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Error on bad input to hexbin extents#27607
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lib/matplotlib/axes/_axes.py Outdated
@@ -4999,6 +4999,10 @@ def reduce_C_function(C: array) -> float | |||
ty = np.log10(ty) | |||
if extent is not None: | |||
xmin, xmax, ymin, ymax = extent | |||
if xmin > xmax: | |||
raise ValueError("In extent, xmin must be greater than xmax") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This error message is backwards (in both X and y)
Requires updating the new test as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks like there was a network error affecting some CI; rerunning the main tests but assuming those are good, LGTM.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
PR summary
If xmin/xmax or ymin/ymax are the wrong way around in
hexbin()
, raise an error. As noted in#18875 (which this is pulled from), this prevents issues with the hexbin marginals not being displayed at all if they are requested.PR checklist