Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0.0 vs. 5.24.1 → go.FigureWidget → same syntax broken output in JN 7.3.2 #4998

Open
MichalRIcar opened this issue Jan 29, 2025 · 0 comments

Comments

@MichalRIcar
Copy link

MichalRIcar commented Jan 29, 2025

Hi,

I am using plotly for the last 5 years with the same syntax without an issue to show graphs in Jupyter Notebook (JN).
However, new v6 has broken functionality of the go.FigureWidget while transiting to anywidgets.
On the other hand, any other graphs (flow generates thousands of them across plotly lib) seems to work OK.

The usecase is that go.FigureWidget is inside python's widgets HBox to show dynamically two graphs next to each other in JN 7.3.2.

Please let me know what other info would be needed.

The code snippet goes like this:

for T in self.TT:
    self.G[T] = go.FigureWidget(
                            data = [
                                go.Scatter(
                                y = self.GRAPH[T][Feature.value],
                                x = list(self.GRAPH[T].index),
                                line=dict(width = 1, color = self.Exo_wg_Update(TH, URi[T])[1])
                            )],
                            layout = go.Layout(Glayout(T,0))
            )
...
G_Box = wg.HBox(list(self.G.values()), layout=wg.Layout(width='1050px',height='320px'))
...
display(G_Box)

Any version < 6 (e.g. 5.2.4) provides designed output:

Image

Version 6 turns to (wrong size and no graph data is shown):

Image

python packages versions:
notebook 7.3.2
ipywidgets 8.1.5
IPython 8.31.0
plotly 6.0.0
anywidget 0.9.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant