I am having trouble putting a histogram and polar scatter plot in two subplots. Hereโs my code:
import plotly
import plotly.graph_objs as go
import numpy as np
fig = plotly.tools.make_subplots(rows=1, cols=2, specs=[[{}, {}]])
trace1 = go.Histogram(
x=np.random.uniform(1,6,size=62),
)
fig.append_trace(trace1, 1, 1)
trace2 = go.Scatter(
r = np.random.uniform(1,6,size=62),
t = np.random.uniform(30,5,size=62),
mode='markers',
)
fig.append_trace(trace2, 1, 2)
plotly.offline.plot(fig, filename='temp.html')
This only renders the histogram correctly - and doesnโt plot anything for the polar scatter plot. If I comment out fig.append_trace(trace1, 1, 1)
, I am able to get the polar scatter plot. Any ideas what am I doing wrong?