【发布时间】:2019-07-30 16:22:33
【问题描述】:
我有一系列带有 u/v 分量的风数据集,并尝试在地理空间地图上使用 plot.ly 将其作为颤动(风矢量)图。但是,我仍然很难做到这一点。有人可以帮我解决这个问题吗?
以下是我的代码
###- This is operating on Jupyter lab with dash extension
###- lon/lat/u/v are 2-D numpy array
fig = ff.create_quiver(lon,lat,u,v,
scale=.25,
arrow_scale=.4,
name='quiver',
line=dict(width=1))
fig['layout'].update(title='Quiver Plot')
fig['layout'].update(geo=dict(
resolution=50,
scope='usa',
showframe=False,
showcoastlines=True,
showland=True,
landcolor="lightgray",
countrycolor="white" ,
coastlinecolor="white",
projection=dict(type='equirectangular'),
domain = dict(x=[0, 1], y=[ 0, 1])
))
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(children=[
html.H1(children='Hello Dash'),
dcc.Graph(
id='example-graph-0',
figure=fig),
])
viewer.show(app)
【问题讨论】:
-
我基本上问了同样的问题。 stackoverflow.com/questions/63053688/…你发现了吗?
-
我当时放弃了,改回使用WMS服务。感谢您让我知道有更新。
-
弗兰克感谢您的更新。通过找到箭头的尖端并在它们周围制作新的轨迹,我能够在我的地图上绘制箭头。我知道这很荒谬,但它确实有效。如果您对此感兴趣,我可以回答您的问题并向您展示详细信息
-
拜托!!我想看看细节。
-
我一有时间就去
标签: python-3.x geospatial plotly-dash jupyter-lab