I have the following code:
import numpy as np import plotly.graph_objs as go import plotly.figure_factory as ff from plotly import tools
alpha = np.random.normal(size=2000)
fig = go.FigureWidget(tools.make_subplots(rows=1, cols=2, print_grid=False)) # Traces trace1 = go.Scatter(y=alpha, line=dict(width=0.5, color='#37AA9C'), name='alpha') dens1 = ff.create_distplot([alpha], ['alpha'], show_rug=True, show_hist=False, colors=['#333F44']) fig.append_trace(trace1, 1, 1) fig.append_trace(fig1['data'], 1, 2) fig.layout.update(height=400, title='Traceplot and density', showlegend=False) fig
Notice that I set
show_rug=True. However, it does not appear.
I suspect that it is there, but it does not fit in the subplot. Is that fixable?