如何在叶绿素图上显示负数
我有一个GeoDataFrame,有一些负值和一些正值。但是,colormap/colorbar不会自动调整负数。如何使色图/色标调整为负数,并将0放在彩条的中间?
import geopandas as gpd
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
# Create some negative values
for index, row in world.iterrows():
if world.loc[index,'pop_est'] % 2 == 0:
world.loc[index,'pop_est'] = world.loc[index,'pop_est'] * (-1)
# Plot
world.plot(column='pop_est', cmap='RdYlBu', legend=True)
目前没有回答
相关问题 更多 >
编程相关推荐