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

fix a minor issue with a matplotlib API change with 3.6 in interactive plot #3322

Merged
merged 1 commit into from Jul 7, 2023

Conversation

megies
Copy link
Member

@megies megies commented Jul 7, 2023

What does this PR do?

Fixes a minor issue due to an API change in recent matplotlib 3.6. The warning message we show in interactive plot windows for Min-Max plots that make no sense when zooming in to much couldn't be removed as intended anymore when zooming back out.

Why was it initiated? Any relevant Issues?

Fixes #3318

PR Checklist

  • Correct base branch selected? master for new features, maintenance_... for bug fixes
  • This PR is not directly related to an existing issue (which has no PR yet).
  • While the PR is still work-in-progress, the no_ci label can be added to skip CI builds
  • If the PR is making changes to documentation, docs pages can be built automatically.
    Just add the build_docs tag to this PR.
    Docs will be served at docs.obspy.org/pr/{branch_name} (do not use master branch).
    Please post a link to the relevant piece of documentation.
  • If all tests including network modules (e.g. clients.fdsn) should be tested for the PR,
    just add the test_network tag to this PR.
  • All tests still pass.
  • Any new features or fixed regressions are covered via new tests.
  • Any new or changed features are fully documented.
  • Significant changes have been added to CHANGELOG.txt .
  • First time contributors have added your name to CONTRIBUTORS.txt .
  • If the changes affect any plotting functions you have checked that the plots
    from all the CI builds look correct. Add the "upload_plots" tag so that plotting
    outputs are attached as artifacts.
  • New modules, add the module to CODEOWNERS with your github handle
  • Add the yellow ready for review label when you are ready for the PR to be reviewed.

@megies megies added the .imaging Issues with our plotting functionalities label Jul 7, 2023
@megies megies added this to the 1.4.1 milestone Jul 7, 2023
@megies megies added the ready for review PRs that are ready to be reviewed to get marked ready to merge label Jul 7, 2023
@megies megies merged commit 364b7be into maintenance_1.4.x Jul 7, 2023
15 of 26 checks passed
@megies megies deleted the fix_mpl_3_6_api_change branch July 7, 2023 11:59
Comment on lines +1458 to +1461
if MATPLOTLIB_VERSION < [3, 6]:
ax.texts.remove(self._minmax_warning_text)
else:
self._minmax_warning_text.remove()
Copy link
Member

Choose a reason for hiding this comment

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

Text.remove has always existed; there's no need to version-gate this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Will remove the if/else tomorrow 🚀

megies added a commit that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.imaging Issues with our plotting functionalities ready for review PRs that are ready to be reviewed to get marked ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants