Skip to content

[Bug]: tripcolor ignores clim #22726

Closed

Description

@anntzer

Bug summary

from pylab import *
tripcolor(np.random.rand(100), np.random.rand(100), np.random.rand(100), clim=(0, 0.5))
colorbar()
show()

shows that tripcolor ignores clim.

Code for reproduction

See above.

Actual outcome

Colorbar/colormapping goes from nearly 0 to nearly 1.

Expected outcome

Colorbar/colormapping goes from 0 to 0.5.

Additional information

This is the same issue as #21146/#21525: kwargs should be handled a bit further down in the implementation of tripcolor() (just before calling _scale_norm).

Operating system

arch linux

Matplotlib Version

3.6.0.dev1920+gdfd83c2c5d

Matplotlib Backend

mplcairo

Python version

310

Jupyter version

ENOSUCHLIB

Installation

git checkout

Activity

  1. andrew-fennell commented on Mar 30, 2022

    @andrew-fennell
    Contributor

    I want to make sure I understand the issue correctly. Could you look at my "correct output"?

    Test code

    from pylab import *
    tripcolor(np.random.rand(100), np.random.rand(100), np.random.rand(100), clim=(0, 0.5))
    colorbar()
    show()
    

    Incorrect output

    image

    Correct output (???)

    image

  2. anntzer commented on Mar 30, 2022

    @anntzer
    ContributorAuthor

    Yes, this would be correct.

  3. added this to the v3.6.0 milestone on Mar 31, 2022
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions