How to make tabular legend using matplotlib and python
问题 I am plotting a choropleth map in python from a shapefile and i want to customize the legend of the plot, i am using the code bellow: import pandas as pd import pysal as ps import geopandas as gp import numpy as np import matplotlib.pyplot as plt pth = 'outcom.shp' tracts = gp.GeoDataFrame.from_file(pth) ax = plot_dataframe(tracts, column='Density', scheme='QUANTILES', k=4, colormap=plt.cm.Blues, legend=True) plt.show() Besides, i am using a small patch that i found here http://nbviewer