I'm on hvplot==0.9.1, holoviews==1.18.1, trying to communicate to the world that hvPlot now works with Polars.
To my surprice I cannot create and render independently to any of the backends. I must recreate and render the plot.
I believe that it must be a fundamental principle that I can create the plot objects and render independently. Anything else does not make sense in my world. Otherwise I can't reuse a plot for different use cases.
Does not work if I create plot once
Works when I create plots again
Code
import polars as pl
import hvplot.polars
df = pl.read_csv("Christmas tree sales 2004-2016.csv")
df = df.with_columns(pl.col("total_trees_sold")/10**6)
plot = df.hvplot.bar(x="Year", y="total_trees_sold", title="Christmas Trees sold by year", color="red", ylabel="Trees Sold in millions", height=200, width=1200)
hvplot.extension("bokeh")
plot
hvplot.extension("matplotlib")
plot
hvplot.extension("plotly")
plot
Not that the recommended and documented way to switch between plotting extensions is to load them all upfront and then use hvplot.output(backend=<backend>) to switch.
I'm on hvplot==0.9.1, holoviews==1.18.1, trying to communicate to the world that hvPlot now works with Polars.
To my surprice I cannot create and render independently to any of the backends. I must recreate and render the plot.
I believe that it must be a fundamental principle that I can create the plot objects and render independently. Anything else does not make sense in my world. Otherwise I can't reuse a plot for different use cases.
Does not work if I create plot once
Works when I create plots again
Code
Christmas tree sales 2004-2016.csv