Skip to content

enable zooming of any rectangular shape on a Plotly heatmap  #6586

@josephernest

Description

@josephernest

Currently there are 2 “zooming” behaviours in Plotly.JS heatmaps:

  • Demo here : Here you can take any rectangular shape for the zoom (click, drag and drop). But then the pixels are not square, which is not ok for some applications (the aspect ratio is not preserved, and sometimes it should be preserved):

  • Demo here : Here the pixels are square thanks to {'yaxis': {'scaleanchor': 'x'}}, but then you can zoom only with a certain aspect ratio rectangular shape, which is sometimes a limiting factor for the UX/UI:

But often, it is useful to have both, i.e. being able to draw a rectangle selection zoom of any shape + keep square-shape pixels.

Eric found a solution here: https://stackoverflow.com/a/76142244/1422096

IMHO this feature should be available directly in Plotly heatmaps (because it's the standard expected behaviour, which is common in Matplotlib etc.), what do you think? @lvlte @archmoj

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions