Hi,
I need to add a horizontal scrollbar to a plotly.subplots
object. Here is my code:
fig = make_subplots(rows=grid_size[0], cols=grid_size[1], specs=specs_arg, horizontal_spacing=0.1, vertical_spacing=0.05, subplot_titles=tuple(param_ids))
fig.add_trace(go.Bar(x=group['parametric_midpt'], y=group['functional_test_count'], name=bar_label, marker_color=bar_color, opacity=self.opacity, legendgroup=legendgroup_id), row=row, col=col)
fig.add_trace(go.Scatter(x=group['parametric_midpt'], y=group['functional_test_yield'], mode='lines+markers', marker_color=line_color, showlegend=False, legendgroup=legendgroup_id), secondary_y=True, row=row, col=col)
fig.update_yaxes(title_text="Frequency", secondary_y=False)
fig.update_yaxes(title_text="Yield", secondary_y=True)
fig.update_layout(width=self.x_axis_size, height=self.x_axis_size/1.78)
legend_y_anchor = -0.15 if opts['overlay'] else -0.2
fig.update_layout(legend=dict(
orientation="h",
yanchor="bottom",
y=legend_y_anchor,
xanchor="left",
x=0.00
))
I have seen folks do this using dash
. Is this possible without using dash? Also, I ended up wrapping by figure object with a FigureWidget
. Would this affect my ability to get a horizontal scrollbar at all?