Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 彩色地图的自定义标记_Python_Geopandas - Fatal编程技术网

Python 彩色地图的自定义标记

Python 彩色地图的自定义标记,python,geopandas,Python,Geopandas,如何确定要在彩色地图上显示的数字 例如,GeoPandas自动显示0.2*10^9,0.4*10^9,0.6*10^9。。。等等如果我只想在正确的位置显示0、500000000和100000000,该怎么办 import geopandas as gpd world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres')) world.plot(column='pop_est', legend=True) 您可以使用参数le

如何确定要在彩色地图上显示的数字

例如,GeoPandas自动显示
0.2*10^9
0.4*10^9
0.6*10^9
。。。等等如果我只想在正确的位置显示
0
500000000
100000000
,该怎么办

import geopandas as gpd

world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world.plot(column='pop_est', legend=True)


您可以使用参数
legend\u kwds
并将所需的记号作为列表传递

import matplotlib.pyplot as plt
import geopandas as gpd

world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world.plot(
    column='pop_est', 
    legend=True,
    legend_kwds={'ticks': [0,500000000,1000000000]}
)
plt.show()