View source: R/xgx_annotate_filenames.R
xgx_annotate_filenames | R Documentation |
xgx_annotate_filenames
appends file details to the bottom of a plot
using the plot caption option.
File details to append include the parent directory, the path of the R
script which generated the plot,
and the path of the plot.
xgx_annotate_filenames(dirs, hjust = 0.5, color = "black", size = 11)
dirs |
list containing directories and filenames. It must contain five fields
|
hjust |
horizontal justification of the caption |
color |
font color for caption, default black |
size |
font size for caption, default 11 |
None
dirs <- list(parent_dir = "/your/parent/path/",
rscript_dir = "./Rscripts/",
rscript_name = "Example.R",
results_dir = "./Results/",
filename = "your_file_name.png")
data <- data.frame(x = 1:1000, y = rnorm(1000))
ggplot2::ggplot(data = data, ggplot2::aes(x = x, y = y)) +
ggplot2::geom_point() +
xgx_annotate_filenames(dirs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.