hvplot
hvplot copied to clipboard
Document that hvPlot works with `quarto preview` if you add `hvplot.extension()`
If you are using hvPlot with Quarto the plots are not shown when quarto preview
rerenders. See https://github.com/quarto-dev/quarto-cli/issues/8030.
The solution is to add the line hvplot.extension()
.
I think that this workaround should be applied automatically behind the scenes if it can or documented somewhere.
This works
https://github.com/holoviz/hvplot/assets/42288570/bd75e925-6cbd-4058-b1df-8695ad46a2b7
I'm quite puzzled by this issue. I don't quite understand why Quarto needs hvPlot users to call hvplot.extension()
explicitly? While this is actually already done automatically when running import hvplot.pandas
. Not saying there isn't a bug in hvPlot/HoloViews, but the fact that there's extra work required to get Quarto to work for hvPlot compared to in a Jupyter notebook hints at a bug in Quarto more than in hvPlot in my opinion.
My hypothesis is that hvPlot/ HoloViews has some test whether the extension has already been loaded. If it has it does not (re-inject) the javascript. But quarto needs it reinjected when it reloads.
My hypothesis is that hvPlot/ HoloViews has some test whether the extension has already been loaded.
I think so, and as such I'd imagine that adding hvplot.extension()
after import hvplot.pandas
would be a no-op.