brandPlot: Add a logo to a ggplot object

Description Usage Arguments Value Examples

View source: R/brandPlot.R

Description

Add a logo to a ggplot object.

Usage

1
2
3
brandPlot(plot, brandStyle = "logo", brandName = "MazamaScience",
  brandFilePath = NULL, location = c("topright", "topleft",
  "bottomright", "bottomleft")[1], size = 0.1)

Arguments

plot

ggplot object

brandStyle

"logo" or "icon".

brandName

Name of brand: "MazamaScience", "USFS", or "AirFire".

brandFilePath

Path to brand logo or icon. If not NULL, overrides brandStyle and brandName.

location

String indicating the location where the logo should be printed. Options are: "topright", "topleft", "bottomright", or "bottomleft".

size

Brand icon or logo width, in fraction of plot width.

Value

A gTree object, which can be printed with grid.draw().

Examples

1
2
3
4
5
6
7
ws_monitor <- PWFSLSmoke::Carmel_Valley
ws_tidy <- monitor_toTidy(ws_monitor)
p <- ggplot_pm25Timeseries(ws_tidy) +
  stat_dailyAQCategory(adjustylim = TRUE)
brandPlot(p, location = "topright", size = .2)
brandPlot(p, location = "bottomright", brandName = "USFS")
brandPlot(p, brandName = "AirFire", location = "topleft", size = .15)

MazamaScience/PWFSLSmokePlots documentation built on Oct. 11, 2019, 11:03 p.m.