I have a list of cities, and I'm trying to graph individual choropleth maps for each city's census tracts (coloring is based on their density
column).
However, I'd like the choropleth to color the census tracts (polygons) based on the entire range of density for all cities, not just the city being graphed.
For example: If Dallas, TX has a minimum density of 0
and a maximum is 5000
, and 5000
is the largest density out of my list of cities, I'd like the choropleth to use that number when coloring in census tracts for each individual city. So if I plot Irving, TX, which would have a maximum density of 200
, that is much less that 5000
, and the coloring should reflect that.
But right now, if I run:
irving.plot(columns='density', ax=ax, cmap='cool', legend=True)
The choropleth will color Irving's census tracts with 0 as the minimum and 200 as the maximum. How can I force the maximum to be what I want and have the choropleth's coloring reflect this?