Skip to content

Remove the scaleanchor constrain on axes having an image trace #6709

Closed
@josephernest

Description

@josephernest

In Keep square pixels + ability to have any rectangular shape zoom with Plotly.js, with a plot with 2 layers's answer by @lvlte, we see that it is sometimes useful to be able to remove the scaleanchor constrain applied by default on axes having an image trace.

But this doesn't work: setting scaleanchor: false on either or both axes has no effect.

The easiest solution is to patch, in https://github.com/plotly/plotly.js/blob/v2.25.2/src/plots/cartesian/constraints.js#L34,

hasImage: axHasImage[axName]

by

hasImage: false

but this is not a solution in the long-term.

Do you think it could be useful to add a setting to avoid this manual patching?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions