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 3.8 contours are now set directly, without iterating through .contours #132

Open
mmagnuski opened this issue Nov 3, 2023 · 1 comment

Comments

@mmagnuski
Copy link
Owner

the tests now print:

borsar/tests/test_viz.py::test_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
  C:\src\borsar\borsar\viz.py:179: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    for line in topo.lines.collections:

borsar/tests/test_viz.py::test_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
  C:\src\borsar\borsar\viz.py:136: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    lines.collections[rem_ln].remove()

borsar/tests/test_viz.py::test_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
  C:\src\borsar\borsar\viz.py:138: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    lines.collections.pop(pop_ln)

borsar/tests/test_viz.py::test_topo
  C:\src\borsar\borsar\viz.py:286: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    for l in self.lines.collections:

borsar/tests/test_viz.py::test_topo
  C:\src\borsar\borsar\viz.py:298: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    for l in self.lines.collections:

borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
borsar/tests/test_viz.py::test_multi_topo
  C:\src\borsar\borsar\tests\test_viz.py:90: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    for line in lines.collections:

borsar/tests/test_viz.py::test_topo_simulated_data
  C:\src\borsar\borsar\viz.py:243: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later.
    [line.set_clip_on(True) for line in topo.lines.collections]

All these should now work without iterating topo.lines.collections, but using topo.lines directly. The easiest "fix" would be to switch to the new syntax and require matplotlib >= 3.8.

@mmagnuski
Copy link
Owner Author

see astropy/astropy#15004 for an example fix

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

No branches or pull requests

1 participant