ggplt | R Documentation |
I am a fan of ggplotly, but its conversion to an html file is not perfect. This hopefully will get around the most likely/worst problems.
ggplt(
gg,
filename = "ggplot.html",
selfcontained = TRUE,
libdir = NULL,
background = "white",
plot_title = class(gg)[[1]],
knitrOptions = list(),
...
)
gg |
Plot from ggplot2. |
filename |
Output filename. |
selfcontained |
htmlwidgets: Return the plot as a self-contained file with images re-encoded base64. |
libdir |
htmlwidgets: Directory into which to put dependencies. |
background |
htmlwidgets: String for the background of the image. |
plot_title |
htmlwidgets: Title of the page! |
knitrOptions |
htmlwidgets: I am not a fan of camelCase, but nonetheless, options from knitr for htmlwidgets. |
... |
Any remaining elipsis options are passed to ggplotly. |
The final output filename
[htmlwidgets] [plotly] [ggplot2]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.