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

Skip to content

Matplotlib 2.0 deprecations #7643

Closed
Closed
@ngoldbaum

Description

@ngoldbaum

I've just finished running the yt unit tests against matplotlib 2.0rc2 (i know, i know I'm late to the party) and noticed some new deprecations. It would be nice if a couple of them could be updated to be somewhat more ergonomic. In particular:

  • The warning about deprecating axes.hold doesn't offer a way to adapt to the new behavior. Maybe the warning should just suggest looking at the API Changes document, which describes the deprecation in much more detail. Here's the warning as I saw it: /Users/goldbaum/Documents/yt-hg/yt/visualization/plot_modifications.py:1389: MatplotlibDeprecationWarning: The hold function was deprecated in version 2.0..

  • It looks like some of the colormaps names have been deprecated. It would be nice if this could be mentioned in the API Changes document. Here's the warning as I saw it: /usr/local/lib/python3.5/site-packages/matplotlib/cbook.py:136: MatplotlibDeprecationWarning: The spectral and spectral_r colormap was deprecated in version 2.0. Use nipy_spectral and nipy_spectral_r instead.

If anyone is curious, here's the pull request I opened which fixes the deprecations I saw:

https://bitbucket.org/yt_analysis/yt/pull-requests/2467/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions