Hi, I’m trying to plot a go.Choropleth map inside a figure fed to dcc.Graph.
Unfortunately, the map is not showed and I’m faced with a grid kind of graph typically used for scatter plots (as per the image below).
I’m running Dash 1.12.0 with Pyplot 4.7.1 (the most up-to-date versions in Python3 pip). The map is displayed correctly when using map_fig.show().
Am I missing something? Is there some problem with the current version of dash?
def plot_country_map(): df = pd.read_csv('countries.csv') map_fig = go.Figure(data=go.Choropleth( locations = df['country_codes'], z = df['country_measurements'], text = df['country_names'], colorscale = 'Reds', autocolorscale=False, marker_line_color='darkgray', marker_line_width=0.5, colorbar_title = 'Measurements', )) map_fig.update_layout( title_text = 'Measured Countries', geo = dict( resolution = 50, projection_type = "miller", showcoastlines=False, lataxis = dict( range = [-60, 90], #Clip Antarctica ), ) ) map_plot = dcc.Graph(id='country_maps',figure=map_fig) return map_plot