save_jpeg.RdFunction that generates a figure and saves it as a JPEG file using common settings.
save_jpeg(
file_name,
fun_plot,
dmn = c(5, 5),
units = "in",
res = 300,
quality = 90,
pointsize = 12,
bg = "white",
family = "",
type = c("windows", "cairo"),
symbolfamily = "default",
return_file_name = FALSE,
...
)
save_jpg(
file_name,
fun_plot,
dmn = c(5, 5),
units = "in",
res = 300,
quality = 90,
pointsize = 12,
bg = "white",
family = "",
type = c("windows", "cairo"),
symbolfamily = "default",
return_file_name = FALSE,
...
)A character string, the desired path to the PNG file.
A function that generates a figure as output.
A numeric vector of two values, the width and height of the figure to save (default is in inches).
A character string, the units for figure dimensions (see grDevices::jpeg).
An integer value, the figure resolution (see grDevices::jpeg).
A numeric value from 0 100, a percentage governing compression (lower values give more compression but worse quality; see grDevices::jpeg).
An integer value, the point size of text (see grDevices::jpeg).
a character string, the background color (see grDevices::jpeg).
A character string specifying the font family (see grDevices::jpeg).
A character string governing how plotting is done (see grDevices::jpeg).
A character string for cairographics options (see grDevices::jpeg).
A logical value,
if TRUE returns the file name
as a character string.
Additional arguments for the
fun_plot function.
A JEPG file, and optionally the file name.