我正在尝试使用底图和seaborn来显示地理点的密度:
f, ax = plt.subplots(1, figsize=(9, 9))
# plot coastlines with basemap
m = Basemap(projection='cyl', resolution='c',
llcrnrlat=bbox[0],urcrnrlat=bbox[1],
llcrnrlon=bbox[2],urcrnrlon=bbox[3])
m.drawmapboundary(fill_color='#DDEEFF')
m.fillcontinents(color='#FFEEDD')
m.drawcoastlines(color='gray', zorder=2)
m.drawcountries(color='gray', zorder=2)
sns.kdeplot(df_toplot['longitude'], df_toplot['latitude'], \
shade=True, cmap='Purples', \
ax=ax); 结果不是很好的The superposition of the two features is overlaping,有没有一种简单的方法来更好地显示点的密度?
发布于 2020-06-20 12:28:45
您是否尝试过为kdeplot函数中的zorder参数提供较高的标量数?它应该看起来像这样:
sns.kdeplot(df_toplot['longitude'], df_toplot['latitude'], \
shade=True, cmap='Purples', \
ax=ax, zorder=100); https://stackoverflow.com/questions/62470294
复制相似问题