Black Lives Matter. Please consider donating to Black Girls Code today.

Can't get polar scatter working in a subplot

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?

@ahmadh84 If you insert after the line:
fig = plotly.tools.make_subplots(rows=1, cols=2, specs=[[{}, {}]])
print fig
you see that a default layout is created:

'layout': {'xaxis1': {'anchor': 'y1', 'domain': [0.0, 0.45]},
'xaxis2': {'anchor': 'y2', 'domain': [0.55, 1.0]},
'yaxis1': {'anchor': 'x1', 'domain': [0.0, 1.0]},
'yaxis2': {'anchor': 'x2', 'domain': [0.0, 1.0]}}

that sets a cartesian system of coordinates for both subplots.
That is why you get an empty window in position (1,2) because one cannot draw a polar chart in a cartesian system (xaxis2, yaxis2).
For a polar plot you need an angularaxis key, but a polar plot as a subplot is not supported yet.