Skip to content

FigureWidget.show() returns a Figure instead of a FigureWidget #4854

@marthacryan

Description

@marthacryan
Collaborator

If you run:

fig = go.FigureWidget()
fig.show()

you get a non-interactive figure.
If you run:

fig = go.FigureWidget()
fig

you get an interactive figure widget. This confused me and could lead to people having issues using FigureWidget.

Activity

gvwilson

gvwilson commented on Nov 11, 2024

@gvwilson
Contributor

@marthacryan should this be changed for 6.0 or left for after?

alexcjohnson

alexcjohnson commented on Nov 11, 2024

@alexcjohnson
Collaborator

Seems to me more like a bug than a feature

added
bugsomething broken
and removed
bugsomething broken
on Nov 11, 2024
marthacryan

marthacryan commented on Nov 12, 2024

@marthacryan
CollaboratorAuthor

Seems to me more like a bug than a feature

@alexcjohnson Yes I would say it is likely a bug

marthacryan

marthacryan commented on Nov 12, 2024

@marthacryan
CollaboratorAuthor

@marthacryan should this be changed for 6.0 or left for after?

I guess this is technically changing an API, although as Alex said above, I think it's more of a bug than an API. I think it isn't a release blocker but might be slightly better to include in the release? I don't expect this would be very difficult to fix, but I think we might want to give some thought to what behavior we do want in this case. I expected it to be the same as just using the FigureWidget object without .show(), but we could also choose to add a warning / error or point the user to just calling fig instead of fig.show(). @ndrezn any opinions?

ndrezn

ndrezn commented on Nov 12, 2024

@ndrezn
Member

I agree that it's a bug but IMO it's not a release blocker. I don't think it's worth changing behaviour unless we're applying a fix.

added
bugsomething broken
and removed on Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @gvwilson@alexcjohnson@marthacryan@ndrezn

      Issue actions

        FigureWidget.show() returns a Figure instead of a FigureWidget · Issue #4854 · plotly/plotly.py