Skip to content

Inconsitencies in colorrange #1737

@KronosTheLate

Description

@KronosTheLate

I know of three plotobjects that have colorranges : heatmaps, contourf, and contour.

Currently, there is a different way to specify the colorrange for all three of them:

  1. heatmaps have an attribute colorrange, which is a tuple
  2. contours have an attribute colorrange, which is a vector
  3. contourfs have an attribute _computed_levels, which is a vector of each level.

Could this not be unified? I feel like they should all be tuples, with contourf's having their _computed_levels from a new attribute colorrange, and their existing attribute levels.

There are two reasons to do this. First of all, internal consistency is just always nice. Secondly, I am trying to implement a sync_colorranges! function that sets the same limits for all heatmaps, contours and countourfs passed to it. It would be nice to make it general, as opposed to having three special cases.

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