This function adds a logo to a plot at a specified position and scale.
Usage
add_logo(plot_path, logo_path, logo_position, logo_scale = 10)
Arguments
- plot_path
The file path of the plot image.
- logo_path
The file path of the logo image.
- logo_position
The position for the logo: "top right", "top left", "bottom right", or "bottom left".
- logo_scale
The scale factor for the logo size relative to the plot (default is 10).
Value
The plot image with the logo added.
Examples
if (FALSE) { # \dontrun{
# Add the logo to the bottom right corner of the plot
plot_with_logo <- add_logo("path/to/plot.png", "path/to/logo.png", "bottom right", 10)
# To view the result in R:
magick::image_view(plot_with_logo)
} # }