0

我正在关注有关如何使用 Canopy Cover 和 Vertical Profile Metrics 数据的GEDI 教程。这是我正在使用的代码:

path1 = hv.Path(pavdAll, vdims='PAVD').options(color='PAVD', clim=(0,0.13), cmap='Greens', line_width=20, colorbar=True,
                                               width=700, height=550, clabel='PAVD', xlabel='Shot Number', tools=['hover'],
                                               ylabel='Elevation (m)', fontsize={'title':16, 'xlabel':16, 'ylabel': 16,
                                                                                 'xticks':12, 'yticks':12,
                                                                                 'clabel':12, 'cticks':10})
path1

当我运行代码时,出现以下错误:

BokehUserWarning:ColumnDataSource 的列必须具有相同的长度。当前长度:('PAVD', 0), ('color', 16), ('xs', 16), ('ys', 16)

我对编程知之甚少,非常感谢可能解决此错误的方法。

截屏

4

1 回答 1

0

我没有弄清楚问题到底是什么,但现在似乎在将 HoverTool 与 hv.Path 一起使用时出现错误:https ://github.com/holoviz/holoviews/issues/4862

从您的代码中删除tools=['hover'],您的可视化应该可以工作,但是没有启用“悬停工具”。

于 2021-04-09T14:22:26.260 回答