holoviz / hvplot

A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews
https://hvplot.holoviz.org
BSD 3-Clause "New" or "Revised" License
1.02k stars 99 forks source link

"SkipRendering: No plotting class for QuadMesh found" when trying to save a map plot with projection #1018

Open JulianGiles opened 1 year ago

JulianGiles commented 1 year ago

ALL software version info

hvplot 0.8.2 pyhd8ed1ab_0 conda-forge python 3.11.0 ha86cf86_0_cpython conda-forge bokeh 2.4.3 pyhd8ed1ab_3 conda-forge cartopy 0.21.1 py311h5d490e5_0 conda-forge matplotlib 3.6.2 py311h38be061_0 conda-forge matplotlib-base 3.6.2 py311he728205_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge xarray 2022.12.0 pyhd8ed1ab_0 conda-forge spyder 5.4.1 py311h38be061_1 conda-forge spyder-kernels 2.4.1 unix_pyhd8ed1ab_0 conda-forge

Description of expected behavior and the observed behavior

I am trying to save a series of maps as a function of time as an interactive plot in an html file. I am running the code from Spyder.

I am using the .hvplot.quadmesh() method and then hvplot.save(). When saving the plots without projection, it works correctly, but if I add the projection option then I get SkipRendering: No plotting class for QuadMesh found when trying to save the plot.

Complete, minimal, self-contained example code that reproduces the issue

import xarray as xr
import hvplot
import hvplot.xarray 
import cartopy.crs as ccrs

air_ds = xr.tutorial.open_dataset('air_temperature').load()

plot = air_ds.isel({"time":slice(0,10)}).hvplot.quadmesh('lon', 'lat', 'air', cmap='viridis', projection=ccrs.Mercator())

hvplot.save(plot, 'test.html')
maximlt commented 1 year ago

Hi @JulianGiles, I tried to reproduce your issue by running your code (in a notebook and as a script) and got no error, the plot was correctly saved as HTML. I ran your code with installs of hvPlot, HoloViews and GeoViews from their main branch. Could you please report the versions installed in your environment of:

JulianGiles commented 1 year ago

Hi @maximlt , thanks for checking on this. Here are the versions:

holoviews                 1.15.4             pyhd8ed1ab_0    conda-forge
geoviews                  1.5.0                      py_0    conda-forge
panel                     0.14.3             pyhd8ed1ab_0    conda-forge