-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect values of lat/lon on hover using latest version #347
Comments
I've been hit by this as well. As a workaround I wanted to create a custom hover showing the z values only. I have a dataset = gv.Dataset(ds, ['longitude', 'latitude'], 'trends', crs=crs.PlateCarree())
print(dataset)
:Dataset [longitude,latitude] (trends) But when I create a custom hover, the values are not shown and I see a from bokeh.models import HoverTool
hover = HoverTool(
tooltips=[
("Trend", "@trends"),
]
)
image = dataset.to(gv.Image).redim.range(trends=(-1.5, 1.5))
plot = image.opts(cmap='RdBu_r', colorbar=True, width=1000, height=500,
projection=crs.Mollweide(), tools=[hover], active_tools=['pan','wheel_zoom']) * gf.coastline
plot It's probably me doing something wrong here, but what? |
Nevermind my question above, this seems to not yet be supported in Holoviews. Using |
@jbednar , I'm hoping this is on the list of tasks to be done for Pangeo. We would really like to stop pinning holoviews to 1.12.1. |
As a workaround, adding the import xarray as xr
import hvplot.xarray
import holoviews as hv
import cartopy.crs as ccrs
print("hv.__version__: ",hv.__version__)
url = 'http://opendap.co-ops.nos.noaa.gov/thredds/dodsC/NOAA/LOOFS/MODELS/201907/glofs.loofs.fields.forecast.20190720.t06z.nc'
data = xr.open_dataset(url)
data = data.set_coords(['lat','lon'])
mesh = data.air_u[-1:,:,:].hvplot.quadmesh(x='lon', y='lat', rasterize=True,
crs=ccrs.PlateCarree(), projection=ccrs.PlateCarree())
mesh |
So using latest holoviews and geoviews I actually can't reproduce this. |
@jsignell Could you confirm? |
Huh, very strange, suddenly I can reproduce it again. |
Maybe you left off |
So the very strange thing here is that it all seems to be set up correctly and it works when you do: pn.panel(hv.render(mesh)) But somehow when letting HoloViews render it, the |
I'm getting the same hover issue (lat/lon show up as projected coords, not in degrees) with |
Correct hover values in
hv.__version__: 1.12.1
:Incorrect hover values in
hv.__version__: 1.12.4
:Reproducible example:
Also correct behaviour is shown without using
crs
.The text was updated successfully, but these errors were encountered: