Interactive
interactive¶
Wrapper for a plotnine ggplot object to make it interactive.
It automatically extracts tooltips and grouping information from the plot mapping if present.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gg
|
ggplot
|
The original plotnine |
required |
kwargs
|
dict
|
Additional arguments passed to |
{}
|
from plotnine import ggplot, aes, geom_point
from ninejs import interactive, css, save
p = ggplot(df, aes("x", "y", tooltip="label")) + geom_point()
(
interactive(p)
+ css(from_file="style.css")
+ save("chart.html")
)