Skip to content

Setting y-axis to invisible does not clear its title #1914

@hylkevds

Description

@hylkevds

Changing the visibility of an y-axis to false with Plotly.update does not clear the axis title from the graph. The axis itself (ticks, numbers, etc.) is removed.

The following jsfiddle (https://jsfiddle.net/tf6urjuq/) shows the issue. It's a modification of the "multiple y-axes example", with only 2 traces. The last two lines hide the second y-axis:

layout.yaxis2.visible = false;
Plotly.update('myDiv', data, layout);

But the text "yaxis2 title" is still visible.

Interestingly, when the axis is re-enabled with a different position, the title is moved to the new position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions