Open rjp23 opened 5 years ago
DataFrames don't seem to have the same issue and this work fine.
small_air_ds = air_ds.isel(lat=0).isel(time=slice(0,10), lon=slice(0,10))
df = small_air_ds.to_dataframe()
scat = df.hvplot.scatter(x='air2', y='air', groupby='lon', height=600, width=600, dynamic=False)
hv.save(scat, 'temp.html')
I'd say this is a work-around for now but not a solution.
Edit: I take it back, this isn't working either for my more complicated example
@philippjfr is this definitely a bug then? I wasn't sure if I was doing something wrong. If it's a bug I'll stop trying to get it to work :-)
The problem here appears to be something to do with the size of the plot, if you increase it to width=900 height=900 it all works.
I'm been trying to save a simple scatter plot as a html file and with a really basic example (variable vs time) it works fine but when trying to plot variables against each other, dynamic=False stops it working.
I've tested this on an xarray test dataset so it's reproducible.
This works perfectly:
scat = air_ds.isel(lat=0).isel(time=slice(0,10), lon=slice(0,10)).hvplot.scatter(x='time', y='air', groupby='lon', height=600, width=600, dynamic=False)
and I can either display it or save it to a HTML file
hvplot.show(scat)
hv.save(scat, 'graph.html')
However, if instead of trying to plot a scatter of a variable against a coordinate (e.g. time), I try to plot two variables against each other then I run into problems.
This works as expected still:
but adding in dynamic=False then causes it to stop working: