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.
Thanks!
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: https://plot.ly/python/map-subplots-and-small-multiples/
^ That example is for type = 'scattergeo'
but type = 'choropleth'
will work the same way.
1 Like
Hi there,
I was trying to use this solution to combine some cartesian charts and a choropleth map. Adding new attributes to the layout (such as the geo_key in your example, ‘chart1’ up to ‘chart3’ in mine) throughs the following error:
ValueError: Invalid property specified for object of type plotly.graph_objs.Layout: 'chart1'
Is this solution still compatible with plotly 5.0 ?
How would you add each chart’s specific domain.x and domain.y info to the layout? It seems to me the layout only takes one single value for each domain.x and domain.y.
Thanks!