Skip to content Skip to sidebar Skip to footer

Displaying Paths With Geoviews

I'm trying to use geoviews to display a path. I can get it to display ONLY the points properly: import numpy as np import geoviews as gv import cartopy.crs as ccrs import pandas as

Solution 1:

The .to method has the purpose of letting you easily group high-dimensional data. In this particular example you have only two dimensions (latitude and longitude) so there is no need to use .to. In your particular example this should be sufficient to construct the plot:

gv.Path([userLine], crs=coord_system)

Path types in HoloViews can be constructed using a list of arrays, dataframes or dictionary of columns, so this would also work:

line_pd = pd.DataFrame(userLine, columns=['Longitude', 'Latitude'])
gv.Path([line_pd], crs=coord_system)

Edit: In your expanded example the format that works for me is as follows:

%%opts Path (cmap='inferno') [tools=[hover] color_index='Max_Wind_Speed']
gv.Path([alldata], vdims=['Pressure','Max_Wind_Speed'], crs=coord_system)

Post a Comment for "Displaying Paths With Geoviews"