Learn R Programming

rtiddlywiki (version 0.5.2)

save_base64: Save ggplot into base64

Description

Save ggplot into base64

Usage

save_base64(plot, width = NULL, height = NULL, dpi = NULL, ...)

Value

character string for base64 image

Arguments

plot

object for ggplot2 or a function for plot

width

image width

height

image height

dpi

image resolution

...

Other arguments for plot function

Examples

Run this code
if (FALSE) {
library(ggplot2)
p <- cars |>
    ggplot() +
    geom_point(aes(speed, dist))
p |> save_base64()
}

Run the code above in your browser using DataLab