假设这个x和y 在这个例子中 是纬度和经度值。我如何将它们叠加在GMap上(即笔记本中的一个)。
我有我的GMap:
如何将 c 绘制在 p 的顶部?
我有我的GMap:
p = GMapPlot(
x_range=Range1d(-160, 160), y_range=Range1d(-80, 80),
plot_width=1000,plot_height=700,
map_options=GMapOptions(lat=48.77, lng=9.18, zoom=4),
title="Cities with more than 5,000 people",
webgl=True, responsive=True)
我有一个数组,用于创建我的图像和它的网格:
m1 = df['longitude'].values
m2 = df['latitude'].values
xmin = m1.min()
xmax = m1.max()
ymin = m2.min()
ymax = m2.max()
X, Y = np.mgrid[xmin:xmax:1000j, ymin:ymax:1000j]
positions = np.vstack([X.ravel(), Y.ravel()])
values = np.vstack([m1, m2])
kernel = stats.gaussian_kde(values)
Z = np.reshape(kernel(positions).T, X.shape)
N = 1000
x = np.linspace(xmin, xmax, N)
y = np.linspace(ymin, ymax, N)
xx, yy = np.meshgrid(x, y)
c = figure(x_range=[xmin, xmax], y_range=[ymin, ymax])
c.image(image=[Z], x=[xmin], y=[ymin], dw=[xmax-xmin], dh=[ymax-ymin], palette="Spectral11")
show(c) # open a browser
如何将 c 绘制在 p 的顶部?