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

Matplotlib Updates #2179

Merged
merged 10 commits into from Nov 24, 2021
Merged

Matplotlib Updates #2179

merged 10 commits into from Nov 24, 2021

Conversation

dopplershift
Copy link
Member

@dopplershift dopplershift commented Nov 1, 2021

Description Of Changes

  • Update to deal with Matplotlib 3.5 removing label kwarg from XTick.__init__
  • As a consequence of dealing with that change, bump minimum Matplotlib to 3.3, which is only a 16 month window, but better than complicated code to deal with changing function signature
  • Remove all library code for handling Matplotlib <3.3
  • Remove all test code dealing with Matplotlib <3.3
  • Eliminate warning coming from Matplotlib 3.5 due to PlotGeometry calling add_collection with our TextCollection class. The warning is triggered because TextCollection isn't a subclass of Collection--just call add_artist instead.

This deals with failures in nightly build opened in #2108, but will require matplotlib >3.5.0rc1 since rc1 has a bug that results in some extraneous Cartopy map lines.

Checklist

@dopplershift dopplershift requested review from kgoebber and a team as code owners November 1, 2021 07:09
@dopplershift dopplershift requested review from dcamron and removed request for a team November 1, 2021 07:09
@dopplershift dopplershift linked an issue Nov 1, 2021 that may be closed by this pull request
@dopplershift dopplershift added Area: Plots Pertains to producing plots Area: Tests Affects tests Type: Maintenance Updates and clean ups (but not wrong) labels Nov 1, 2021
@dopplershift dopplershift added this to the 1.2.0 milestone Nov 1, 2021
@dopplershift dopplershift changed the title Matplotlib 3.5 Matplotlib Updates Nov 1, 2021
@dopplershift dopplershift marked this pull request as draft November 1, 2021 07:30
@dopplershift dopplershift force-pushed the matplotlib-3.5 branch 4 times, most recently from acc386a to d329517 Compare November 18, 2021 03:35
@dopplershift
Copy link
Member Author

Ok, this is at least passing with the PyPI stack. Working on getting Conda testing packages for 3.5.

@dopplershift dopplershift force-pushed the matplotlib-3.5 branch 2 times, most recently from 261613c to 3abbd3e Compare November 19, 2021 23:57
@dopplershift
Copy link
Member Author

Waiting on a fix for conda-forge's requests 2.26.0 recipe so we can update past a buggy version of charset_normalizer. Because obviously, since neither package is something we directly rely upon. 🤬

That should get the examples building again.

Matplotlib 3.5 removes the `label` kwarg, so we need to follow suit.
While this is shorter than our desired 2 year support window, it's
easier to do this than to handle different __init__ parameters for XTick
across different versions.
Use `add_artist` instead of `add_collection` since Matplotlib as of 3.5
has started checking that objects passed to `add_collection` inherit
from `Collection`, which `TextCollection` currently does not do.
For some reason these were plotting lines over themselves. Move the
lines apart to make the test better.
Matplotlib 3.5 subtly changed artist draw order. These grid-like lines
really need to be treated explicitly as such with zorder anyway.
Small thresholds got bumped up, but anything at 0.1 or higher got a new
image.
Was failing. To avoid warnings about edges, just go ahead and
calculation the correct quad edges.
@dopplershift dopplershift marked this pull request as ready for review November 24, 2021 19:30
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

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

All green from me and the friendly robots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Plots Pertains to producing plots Area: Tests Affects tests Type: Maintenance Updates and clean ups (but not wrong)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly build is failing
2 participants