Skip to content

register_cmap() got an unexpected keyword argument 'data' #40

Closed

Description

@xylar

ILAMB appears not to be compatible with matplotlib >= 3.4.0. As an example, see this CI build on conda-forge.

Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/ilamb_1620761448485/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/ilamb-run", line 20, in <module>
    if "stoplight" not in plt.colormaps(): RegisterCustomColormaps()
  File "/home/conda/feedstock_root/build_artifacts/ilamb_1620761448485/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.9/site-packages/ILAMB/Post.py", line 1030, in RegisterCustomColormaps
    plt.register_cmap(name='stoplight', data=RdYlGn)
TypeError: register_cmap() got an unexpected keyword argument 'data'

This feature was apparently deprecated 1 1/2 years ago: matplotlib/matplotlib#15875 in 3.3.0 and was dropped in 3.4.0.

Activity

  1. xylar commented on May 18, 2021

    @xylar
    Author

    It looks like this was fixed in #33. So I guess what I would be asking for is a new release of ILAMB with this fix.

  2. nocollier commented on May 18, 2021

    @nocollier
    Collaborator

    Thanks @xylar, I have been procrastinating a new release for a while now, updated to 2.6 today. I believe that should fix it.

  3. xylar commented on May 18, 2021

    @xylar
    Author

    Thanks so much! I'll give that a try tomorrow and close this, assuming all goes well.

  4. xylar commented on May 19, 2021

    @xylar
    Author

    A simple import test certainly works. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions