I am having a issue with size of the second graph added to the tab widget, which is not of the size of all the container: here is by code
''' output_co2 = widgets.Output()
output_co = widgets. Output()
tab = widgets.Tab(children=[output_co2, output_co],
layout=widgets.Layout(width='100%', height='100%'))
tab.set_title(0, 'CO2')
tab.set_title(1, 'CO')
display(tab)
with output_co2:
fig = go.Figure()
fig.add_trace(go.Scatter(x=vehicleData['distance_m']/1000,
y=vehicleData['co_gs'],
name='CO [g/s]',
mode="lines",
line=dict(
width=2),
fig.show()
with output_co:
fig = go.Figure()
fig.add_trace(go.Scatter(x=vehicleData['distance_m']/1000,
y=vehicleData['co_gs'],
name='CO [g/s]',
mode="lines",
line=dict(
width=2),
fig.show() '''
With plotly you need to use the
go.FigureWidget()in place ofgo.Figure(), see here. So something like this:Alternative: With plotly you can use
go.FigureWidget()directly instead ofwidgets.Output()