import lets_plot as lp from plotnine.data import mtcars lp.LetsPlot.setup_html() mtcars = mtcars.assign(cyl=mtcars["cyl"].astype(str).astype("category")) bench_geom_point = ( lp.ggplot(data=mtcars, mapping=lp.aes("wt", "mpg")) + lp.geom_point(lp.aes(color="cyl")) + lp.ggsize(width=680.31496063, height=453.54330709) + lp.theme_bw() ) for ext in ["html", "svg"]: print( lp.ggsave( bench_geom_point, filename=f"letsplot_geom_point.{ext}", path=".", iframe=False, ) )