I am trying to use geopandas plotting function to display a choropleth, but I am getting a bit stuck on how the figure’s size and axes are set with matplotlib.
When I do this I get no axes, as desired, but my figure is much smaller than I’d like it to be (
gdf is a GeoDataFrame):
import matplotlib.pyplot as plt ax = plt.gca() ax.axes.xaxis.set_visible(False) ax.axes.yaxis.set_visible(False) gdf.plot(column='percent_without_vehicle', ax=ax, legend=True)
When I do this, I get the figure in the size I’d like, but the axes show up (which I don’t really need since I’m looking at a map):
gdf.plot(column='percent_without_vehicle', figsize=(10, 10), legend=True)
I am sure there is a way to set the figure size using
ax since GeoPandas docs are clear that setting it will manually overwrite the
figsize I am using, but I can’t seem to “figure” () it out.