Plot a maps not working in Notebook

06-14-2021 02:43 AM
New Contributor III

Hi everyone i'm trying to plot a map using Geopandas and Matplotlib but is not showing , How i can fix that?

0 Kudos
2 Replies
Occasional Contributor II


Do it these two settings in your notebook.

1. In Run do it Markdown as mention in below pic.



2. All Output to be toggle.



0 Kudos
MVP Esteemed Contributor

To simply show the map, all you need to do is


What your code is doing, however, is assigning the output of the plot function to the variable ax, but not actually calling that output to see it. If all you want is to see the plot, you can call that variable in its own cell.

If, however, you're trying to create a MatPlotLib figure with the map in it, there's a different way. Note in the GeoPandas documentation for the plot function the parameter ax. This parameter indicates that you want your plot assigned to MatPlotLib axes; you should already have one established.

Try something like this:

fig1, ax1 = plt.subplots(1, 1, figsize=(6,6))



- Josh Carlson
Kendall County GIS
0 Kudos