FigureWidget does work not from inside an if statement
See original GitHub issueEncountered in Jupyter Lab.
Take the following 2 cases:
fig = go.FigureWidget()
fig
&
silent=False
if not silent:
fig = go.FigureWidget()
fig
The first one produces a figure, the second one does not. Why don’t they behave similarly?
If I use the @interact
decorator in the second case.
e.g.
if not silent:
fig = go.FigureWidget()
fig.add_scatter()
@interact(s=(3,5))
def update(s=3):
with fig.batch_update():
fig.data[0].y = np.random.normal(size=s)
fig
the slider appears, but the figure does not.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Plotly figurewidget overview in Python
Construct a FigureWidget from a Figure graph object¶. A standard Figure object can be passed to the FigureWidget constructor.
Read more >plotly's FigureWidget does not respect display order when ...
Before getting that far, I am unable to get the images displayed correctly inside jupyterlab together with ipywidgets.
Read more >Could we have Plotly FigureWidget support? - Streamlit
I want to use Streamlit instead (else Panel), but a requirement I have is interactions between plots - so selecting an area of...
Read more >Supercharge your Python plots with zero extra code!
The importance of plotting in a data scientist's work cannot be overstated. ... If you have worked on any kind of data analysis...
Read more >How to make multi-index index charts with Plotly
While regular index charts work fine, by using a simple extension to ... If you care about only one of the three charts...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
display
is what IPython calls automatically on the last top-level expression to display it in your first example.You may be able to use the
display
command:(if you have an older version of ipython, you may need to import it:
from IPython.display import display