xgx_save | R Documentation |
Saving plot, automatically annotating the status and denoting the filenames
xgx_save(
width,
height,
dirs = NULL,
filename_main = NULL,
status = "DRAFT",
g = ggplot2::last_plot(),
filetype = "png",
status_x = Inf,
status_y = Inf,
status_fontsize = 7,
status_fontcolor = "grey",
filenames_fontsize = 11,
filenames_fontcolor = "black"
)
width |
width of plot |
height |
height of plot |
dirs |
list of directories. If NULL or if directories missing, there is default behavior below
|
filename_main |
main part of the filename, excluding prefix and suffix. no default |
status |
status to be annotated |
g |
ggplot plot object, default is ggplot::last_plot() |
filetype |
file extension (e.g. "pdf","csv" etc.) |
status_x |
x location of the status in plot |
status_y |
y location of the status in plot |
status_fontsize |
font size for status in plot |
status_fontcolor |
font color for status in plot |
filenames_fontsize |
font size for filenames info in plot |
filenames_fontcolor |
font color for filenames info in plot |
ggplot2 plot object
directory = tempdir()
dirs <- list(parent_dir = directory,
rscript_dir = directory,
rscript_name = "example.R",
results_dir = directory,
filename_prefix = "example_")
data <- data.frame(x = 1:1000, y = stats::rnorm(1000))
ggplot2::ggplot(data = data, ggplot2::aes(x = x, y = y)) +
ggplot2::geom_point()
xgx_save(4, 4, dirs, "Example", "DRAFT")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.