ipympl icon indicating copy to clipboard operation
ipympl copied to clipboard

fig.canvas displays in all ipywidgets.Tab tabs

Open chaffra opened this issue 6 years ago • 3 comments

In the latest version (0.3.3) a fig.canvas does not display correctly in ipywidgets.Tab. Notional example:

tab = widgets.Tab()
tab.children = [fig1.canvas, fig2.canvas]
tab

The figures appear in both tabs. Not expected and this used to work in previous version (0.2.1). Please also see picture. tab_display_error

chaffra avatar Jul 16 '19 07:07 chaffra

This bug is still active in version 0.3. Snippet displays correctly in version 0.2.1. Can anyone reproduce?

chaffra avatar Nov 15 '19 19:11 chaffra

I have seen this problem. Putting the canvases in Boxes worked for me, not sure why.

keatonb avatar Dec 31 '19 23:12 keatonb

enclosing in a ipywidgets.Box works as a workaround. Thanks @keatonb. I think the Canvas is missing something the other widgets have.

chaffra avatar Jan 29 '21 00:01 chaffra