import geopandas as gpd
import matplotlib.pyplot as plt
from numpy import log10
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world = world[(world.pop_est>0) & (world.name!="Antarctica")]
world['logval'] = log10(world['pop_est'])
fig, ax = plt.subplots(1, 1)
world.plot(column='logval', ax=ax, legend=True)
AttributeError: module 'matplotlib.pyplot' has no attribute 'colors'
的问题。在我的脚本开头,我有import matplotlib.colors as colors
。 - Stückematplotlib
:) - Stückeexplore
方法有什么内容吗? - Vovin