sarid_brand: Rebrand a ggplot with logo and optionally localize it for...

Description Usage Arguments Value See Also Examples

View source: R/sarid_brand.R

Description

Rebrand a ggplot with logo and optionally localize it for Hebrew (using RTL layout)

Usage

1
2
3
4
5
6
sarid_brand(
  plot,
  logo_location = c("right", "left", "none"),
  rtl = T,
  annotation_label = ""
)

Arguments

plot

The ggplot on which to apply the changes.

logo_location

May be "left", "right", or "none".

rtl

Logical. Should right to left layout be applied on the chart.

annotation_label

A string to annotate the logo.

Value

An updated ggplot object rebranded to the Sarid look and feel. If the logo option wasn't disabled (by logo_location = NULL) a gridExtra object is returned. Otherwise, a ggplot2 object is returned.

See Also

sarid_theme

Examples

1
2
3
4
5
6
base_plot <- ggplot(mtcars, aes(x = disp, y = mpg, color = factor(cyl))) + geom_point()
sarid_brand(base_plot)
sarid_brand(base_plot + theme_sarid(), rtl = T)
sarid_brand(base_plot + theme_sarid(), logo_location = "left", annotation_label = "Sarid Research. Trusted Insights, Proven Results.")
sarid_brand(base_plot + theme_sarid() + facet_wrap(~vs), logo_location = "none")
sarid_brand(base_plot + theme_sarid() + facet_wrap(~vs), logo_location = "right", annotation_label = "\u202bמכון שריד. מחקר שמביא תוצאות.")

sarid-ins/saridr documentation built on Nov. 10, 2020, 9:07 p.m.