Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cleanup image_zcoord example. #24289

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

Merged
merged 1 commit into from
Oct 28, 2022
Merged

Cleanup image_zcoord example. #24289

merged 1 commit into from
Oct 28, 2022

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Oct 28, 2022

PR Summary

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

if 0 <= col < numcols and 0 <= row < numrows:
col = round(x)
row = round(y)
if 0 <= col < X.shape[0] and 0 <= row < X.shape[1]:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if 0 <= col < X.shape[0] and 0 <= row < X.shape[1]:
if 0 <= col < X.shape[1] and 0 <= row < X.shape[0]:

or

    numrows, numcols = X.shape
    if 0 <= col < numcols and 0 <= row < numrows:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, the classic bug. fixed.

@timhoffm timhoffm added this to the v3.7.0 milestone Oct 28, 2022
@timhoffm timhoffm merged commit 9b4985e into matplotlib:main Oct 28, 2022
@anntzer anntzer deleted the iz branch October 28, 2022 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants