I have a choropleth that highlights some of the data from a table. I would like to combine both of these onto one plot (with the map in the top half, and the table in the bottom half), but I am unable to make this look readable. All I get is the table placed directly on top of the map, blocking a large part of it.
From what I’ve seen, I can use plotly tools to create subplots, and append the 2 traces to the figure together with which subplot they should use. That didn’t work:
trace_map = go.Choropleth( # choropleth contents ) trace_table = go.Table( # table contents ) fig = tools.make_subplots(rows=2, cols=1) fig.append_trace(trace_map, 1, 1) fig.append_trace(trace_table, 2, 1)
Plotting this gives me the following error:
ValueError: Invalid property specified for object of type plotly.graph_objs.Choropleth: 'xaxis'
If I put the table first, I get the same error but then for the table.
I also tried setting the xaxis and yaxis directly into the traces, which I’ve also seen used, but that gives me the same errors.
Is it even possible to do this?