有没有办法在地理地图上绘制海底KDE

时间:2020-06-19 12:27:00

标签: python seaborn matplotlib-basemap kernel-density geography

我正在尝试使用Basemap和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 有没有一种简单的方法可以更正确地显示点的密度?

1 个答案:

答案 0 :(得分:0)

您是否尝试过为import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @Component({ selector: 'app-transaction', templateUrl: './transaction.page.html', styleUrls: ['./transaction.page.scss'], }) export class TransactionPage implements OnInit { constructor(public router : Router) {} wallet: number = 100; amount: number ; ngOnInit() { } transact() { this.router.navigateByUrl('/congratulation'); this.wallet = this.wallet - this.amount; return this.wallet; } } 函数中的zorder自变量提供高阶标量?它应该看起来像这样:

kdeplot