| goose_optimize_plot | R Documentation |
Get AI suggestions to improve a ggplot2 visualization.
goose_optimize_plot(
plot_code,
goals = c("aesthetics", "clarity", "accessibility"),
data_sample = NULL
)
plot_code |
Character string or expression with ggplot2 code |
goals |
Character vector of optimization goals |
data_sample |
Optional sample of the data being plotted |
List with optimized code and suggestions
## Not run:
plot_code <- "
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point()
"
optimized <- goose_optimize_plot(plot_code,
goals = c("aesthetics", "clarity"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.