I have been having trouble getting the figures from the example provided in Geopandas Gallery examples. When I ran these scripts in Jupyter console:
import geopandas import geoplot import matplotlib.pyplot as plt world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres')) africa = world.query('continent == "Africa"') ax = geoplot.cartogram(africa, scale='pop_est', limits=(0.2, 1), edgecolor='None', figsize=(7, 8)) geoplot.polyplot(africa, edgecolor='gray', ax=ax)
I will only get the this output:
<matplotlib.axes._subplots.AxesSubplot at 0x7f31fff31d30>
I have tried including the %matplotlib inline at the beginning of my Jupyter console, and I also have tried plt.show() at the end of the script. However, my console did not display the figure. I am looking into getting this figure:
Does someone have an idea to visualize the output a matplotlib.axes._subplots.AxesSubplot object?
I am on an Anaconda bundle using: Python 3.6, Geopandas 0.5.1, Matplotlib 3.1.1