openstreetmap - 使用全息视图放大时,如何让 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)
解决方案
推荐阅读
- javascript - JavaScript 中是否有 Array.Sort 的快捷方式?
- sql - 添加列号的查询结果自动动态递增
- node.js - 从 sequelize.js 获取错误的对象名称包含从数据到数据的 JSON 响应中的方法
- xml - VS Code Salesforce 导入选项列表值 [isActive 标签缺失]
- python - 如何在 Python 中使用 API 密钥从 API 获取数据
- testing - Nodemon 忽略失败的命令
- firebase - 如何从 firebase 将数据添加到类模型内的列表中。扑
- sql-server - MDX - 基于早期销售的计数
- firebase - 使用云 Firestore 的其他情况在 Flutter 中不起作用
- javascript - X字符后自动提交功能