Skip to content

Cannot specify figure width with Jupyterlab #2324

Open
@emmanuelle

Description

@emmanuelle

Jupyterlab always resizes the width of the figure to the width of the notebook. When executing the code below, one can see the figure generated with the correct figure for a very short time, and then it resizes to the full width. Is it related to recent changes to make plotly figures more reactive?

import plotly.graph_objects as go
fig = go.Figure(go.Scatter(y=[2, 3]))
fig.update_layout(width=100)
print(fig)
fig.show()

image

Inside a fresh environment, with plotly / jupyterlab / widgets versions of our Readme.

No error messages in the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions