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

Skip to content

VisibleDeprecationWarnings in test_given_colors_levels_and_extends #7334

@QuLogic

Description

@QuLogic

On Travis, the test_given_colors_levels_and_extends test is generating two VisibleDeprecationWarnings:

.../matplotlib/colorbar.py:539: VisibleDeprecationWarning:
 boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 4
  colors = np.asarray(colors)[igood]
.../matplotlib/colorbar.py:539: VisibleDeprecationWarning:
 boolean index did not match indexed array along dimension 0; dimension is 5 but corresponding boolean dimension is 3
  colors = np.asarray(colors)[igood]

The first occurs on the axes that is not filled and extend='min'; the second with unfilled and extend='both'. The passed colour list is 5 elements long and the levels list is 4 or 3. The warning can easily be fixed by trimming the colour list, but I'm not sure exactly where that should be.

I guess I'm not entirely sure why one less level is passed for extend='both' when only unfilled. cc @pelson who wrote the test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions