Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Can you create choropleth subplots

I am trying to create two subplots of choropleth maps side by side
But when I append_trace the choropleth
I get
PlotlyDictKeyError: ‘yaxis’ is not allowed in ‘choropleth’

Z:\Anaconda2\lib\site-packages\plotly\graph_objs\graph_objs.pyc in append_trace(self, trace, row, col)
    934             trace['xaxis'] = ref[0]
    935             trace['yaxis'] = ref[1]
--> 936         self['data'] += [trace]

It seems as though it assumes it will have a yaxis.
Does this mean that it doesn’t support the map in subplots or am i doing something wrong?

trying to do this multiple subplots except using map. since that is actually a scattered plot.

Hi there,
As previously mentioned, maps are not plotted on a cartesian system of coordinates (x/y). Here you can find an example of map subplots:

^ That example is for type = 'scattergeo' but type = 'choropleth' will work the same way.

1 Like