我正在尝试将geoviews.tile_sources
图层与datashade
图层结合起来。两层分别产生正确的轴(见图),但当组合(使用*
)时,比例会失真。
import numpy as np
import pandas as pd
import holoviews as hv
from geoviews.tile_sources import EsriImagery
from holoviews.operation.datashader import datashade
hv.extension('bokeh')
lats = np.random.uniform(51.111, 51.222, 10000)
longs = np.random.uniform(1.31, 1.33, 10000)
df = pd.DataFrame({"latitude": lats, "longitude": longs})
points = hv.Points(df, ['longitude', 'latitude'])
shader = datashade(points)
EsriImagery * shader
但是,两个单独的图都是正确的:
shader + EsriImagery