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

Skip to content

[ENH]: Let norm argument accept string values in tripcolour #25453

Closed
@svaberg

Description

@svaberg

Problem

Currently the tripcolor function accepts only Normalize objects and None for the norm argument. However, the underlying functions used by tripcolor all seem to accept a string value for norm such as log, symlog, etc.

I therefore suggest permitting the passing of string values for the norm argument in tripcolor.

Proposed solution

I suggest changing the line

_api.check_isinstance((Normalize, None), norm=norm)

in tripcolor to

_api.check_isinstance((Normalize, str, None), norm=norm)

I have tested this change with both gouraud and flat values passed as the shading argument and, as far as I can tell, it works perfectly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions