Skip to content

Dynamically theme plots using a state variable #5

@MattTheCuber

Description

@MattTheCuber

When creating Plotly figures, you can specify the theme using the argument go.Figure(layout={"template": "plotly_dark"}). However, this is not dynamic and you must generate a new plot to update the plot's theme.

Is it be possible to specify the theme dynamically by using something like plotly.Figure(figure=fig, layout=("plotly_theme", {"template": "plotly_dark"})). This does not currently work (or even run), I tried multiple ways for dynamic theming.

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