首页 > 解决方案 > 使用全息视图放大时,如何让 plottetd 点保持相同大小?

问题描述

我正在使用 python 中的全息视图在地图上绘制点,即使放大,我也希望绘制的点保持相同的大小。我正在使用散景扩展。

我发现这篇文章解决了散景问题,这是一个链接。但到目前为止,我还没有找到全息视图的解决方案。

这是一些示例代码:

import datashader.geo
import hvplot.pandas
import holoviews as hv
from holoviews.element.tiles import OSM
hv.notebook_extension("bokeh")

# select some data from dataframe
most_severe = df.loc[df['samples'] >= 1000]
x, y = datashader.geo.lnglat_to_meters(most_severe['lon'], most_severe['lat'])
most_severe_projected = most_severe.join([pd.DataFrame({'easting': x}), pd.DataFrame({'northing': y})])

# plot the data
OSM() * most_severe_projected.hvplot.points(x='easting', y='northing', c='net', 
                                             hover_cols=list(df.columns), 
                                             title='my_plot',
                                            s=10, height=600, width=800)

标签: openstreetmapholoviewsdatashaderhvplotgeoviews

解决方案


推荐阅读