Skip to content

shift forestplot text to Roboto #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions R/oxford_theme_forest.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' @param summary_fill Colour for filling the summary diamond shape. Default set
#' to value of `summary_col`.
#' @param footnote_cex Multiplier applied to font size for footnote.
#' @param footnote_fontface The font face for footnote.
#' @param footnote_fontface The font face for footnote. Default to *plain*.
#' @param footnote_col Colour of the footnote. Default set to
#' *Oxford royal blue*.
#' @param title_col Colour of title. Default set to *Oxford blue*
Expand Down Expand Up @@ -86,7 +86,7 @@ theme_oxford_forest <- function(base_size = 11.5,
#'

theme_heritage_forest <- function(base_size = 11,
base_family = "Marcellus",
base_family = "Roboto",
bg_col = get_oxford_colour("sage"),
ci_col = get_oxford_colour("Oxford blue"),
ci_fill = ci_col,
Expand All @@ -98,7 +98,7 @@ theme_heritage_forest <- function(base_size = 11,
footnote_fontface = "plain",
footnote_col = get_oxford_colour("green"),
title_col = get_oxford_colour("Oxford blue"),
title_fontfamily = base_family,
title_fontfamily = "Marcellus",
arrow_fill = get_oxford_colour("Oxford blue"),
arrow_col = arrow_fill) {
forestploter::forest_theme(
Expand Down Expand Up @@ -131,7 +131,7 @@ theme_heritage_forest <- function(base_size = 11,
#'

theme_contemporary_forest <- function(base_size = 10.5,
base_family = "Montserrat",
base_family = "Roboto",
bg_col = get_oxford_colour("cool"),
ci_col = get_oxford_colour("Oxford blue"),
ci_fill = ci_col,
Expand All @@ -143,7 +143,7 @@ theme_contemporary_forest <- function(base_size = 10.5,
footnote_fontface = "plain",
footnote_col = get_oxford_colour("aqua"),
title_col = get_oxford_colour("Oxford blue"),
title_fontfamily = base_family,
title_fontfamily = "Montserrat",
arrow_fill = get_oxford_colour("Oxford blue"),
arrow_col = arrow_fill) {
forestploter::forest_theme(
Expand Down Expand Up @@ -176,7 +176,7 @@ theme_contemporary_forest <- function(base_size = 10.5,
#'

theme_celebratory_forest <- function(base_size = 10.5,
base_family = "Noto Serif Display",
base_family = "Roboto",
bg_col = get_oxford_colour("lavender"),
ci_col = get_oxford_colour("Oxford blue"),
ci_fill = ci_col,
Expand All @@ -188,7 +188,7 @@ theme_celebratory_forest <- function(base_size = 10.5,
footnote_fontface = "plain",
footnote_col = get_oxford_colour("viridian"),
title_col = get_oxford_colour("Oxford blue"),
title_fontfamily = base_family,
title_fontfamily = "Noto Serif Display",
arrow_fill = get_oxford_colour("Oxford blue"),
arrow_col = arrow_fill) {
forestploter::forest_theme(
Expand Down Expand Up @@ -221,7 +221,7 @@ theme_celebratory_forest <- function(base_size = 10.5,
#'

theme_corporate_forest <- function(base_size = 10.5,
base_family = "Bebas Neue",
base_family = "Roboto",
bg_col = get_oxford_colour("sky"),
ci_col = get_oxford_colour("Oxford blue"),
ci_fill = ci_col,
Expand All @@ -233,7 +233,7 @@ theme_corporate_forest <- function(base_size = 10.5,
footnote_fontface = "plain",
footnote_col = get_oxford_colour("royal"),
title_col = get_oxford_colour("Oxford blue"),
title_fontfamily = base_family,
title_fontfamily = "Bebas Neue",
arrow_fill = get_oxford_colour("Oxford blue"),
arrow_col = arrow_fill) {
forestploter::forest_theme(
Expand Down Expand Up @@ -266,7 +266,7 @@ theme_corporate_forest <- function(base_size = 10.5,
#'

theme_innovative_forest <- function(base_size = 10.5,
base_family = "Phudu",
base_family = "Roboto",
bg_col = get_oxford_colour("lavender"),
ci_col = get_oxford_colour("Oxford blue"),
ci_fill = ci_col,
Expand All @@ -278,7 +278,7 @@ theme_innovative_forest <- function(base_size = 10.5,
footnote_fontface = "plain",
footnote_col = get_oxford_colour("viridian"),
title_col = get_oxford_colour("Oxford blue"),
title_fontfamily = base_family,
title_fontfamily = "Phudu",
arrow_fill = get_oxford_colour("Oxford blue"),
arrow_col = arrow_fill) {
forestploter::forest_theme(
Expand Down
22 changes: 11 additions & 11 deletions man/theme_forest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions vignettes/oxford-forestploter-themes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "This title is in Roboto plain font in Oxford blue",
footnote = "Footnote is in Roboto plain font\nin Oxford royal blue",
title = "Title in Roboto plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford royal blue",
theme = theme_oxford_forest())

## Print plot
Expand All @@ -103,8 +103,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "This title is in Roboto plain font in Oxford blue",
footnote = "Footnote is in Roboto plain font\nin Oxford royal blue",
title = "Title in Roboto plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford royal blue",
theme = theme_oxford_forest())

# Print plot
Expand All @@ -129,8 +129,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Marcellus plain font in Oxford blue",
footnote = "Footnote is in Marcellus plain font\nin Oxford green",
title = "Title in Marcellus plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford green",
theme = theme_heritage_forest())

## Print plot
Expand All @@ -152,8 +152,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Marcellus plain font in Oxford blue",
footnote = "Footnote is in Marcellus plain font\nin Oxford green",
title = "Title in Marcellus plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford green",
theme = theme_heritage_forest())

# Print plot
Expand All @@ -179,8 +179,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Montserrat plain font in Oxford blue",
footnote = "Footnote is in Montserrat plain font\nin Oxford aqua",
title = "Title in Montserrat plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford aqua",
theme = theme_contemporary_forest())

## Print plot
Expand All @@ -202,8 +202,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Montserrat plain font in Oxford blue",
footnote = "Footnote is in Montserrat plain font\nin Oxford aqua",
title = "Title in Montserrat plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford aqua",
theme = theme_contemporary_forest())

# Print plot
Expand All @@ -229,8 +229,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Noto Serif Display plain font in Oxford blue",
footnote = "Footnote is in Noto Serif Display plain font\nin Oxford viridian",
title = "Title in Noto Serif Display plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford viridian",
theme = theme_celebratory_forest())

## Print plot
Expand All @@ -255,8 +255,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Noto Serif Display plain font in Oxford blue",
footnote = "Footnote is in Noto Serif Display plain font\nin Oxford viridian",
title = "Title in Noto Serif Display plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford viridian",
theme = theme_celebratory_forest())

# Print plot
Expand All @@ -282,8 +282,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Bebas Neue plain font in Oxford blue",
footnote = "Footnote is in Bebas Neue plain font\nin Oxford royal blue",
title = "Title in Bebas Neue plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford royal blue",
theme = theme_corporate_forest())

## Print plot
Expand All @@ -308,8 +308,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Bebas Neue plain font in Oxford blue",
footnote = "Footnote is in Bebas Neue plain font\nin Oxford royal blue",
title = "Title in Bebas Neue plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford royal blue",
theme = theme_corporate_forest())

# Print plot
Expand All @@ -335,8 +335,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Phudu plain font in Oxford blue",
footnote = "Footnote is in Phudu plain font\nin Oxford viridian",
title = "Title in Phudu plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford viridian",
theme = theme_innovative_forest())

## Print plot
Expand All @@ -361,8 +361,8 @@ p <- forest(dt[ , c(1:3, 20:21)],
arrow_lab = c("Placebo Better", "Treatment Better"),
xlim = c(0, 4),
ticks_at = c(0.5, 1, 2, 3),
title = "Title is in Phudu plain font in Oxford blue",
footnote = "Footnote is in Phudu plain font\nin Oxford viridian",
title = "Title in Phudu plain font in Oxford blue",
footnote = "Footnote in Roboto plain font\nin Oxford viridian",
theme = theme_innovative_forest())

# Print plot
Expand Down