Skip to content

Commit

Permalink
allowing font size to be specified in theme_pr
Browse files Browse the repository at this point in the history
  • Loading branch information
clairedavies committed Nov 13, 2023
1 parent 15b04b5 commit 2bd7449
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions R/theme_pr.R
Expand Up @@ -4,14 +4,16 @@
#'
#' @importFrom ggplot2 '%+replace%'
#'
#' @param FontSize use to set font size with base_size
#'
#' @export
#' @return planktonr theme
#'
#' @examples
#' \dontrun{ggplot() + geom_blank() + theme_pr()}
theme_pr <- function(){
theme_pr <- function(FontSize = 16){
font <- "Georgia" #assign font family up front
ggplot2::theme_bw(base_size = 16) %+replace% #replace elements we want to change
ggplot2::theme_bw(base_size = FontSize) %+replace% #replace elements we want to change
ggplot2::theme(
legend.position = "bottom",
strip.background = ggplot2::element_blank(),
Expand Down
5 changes: 4 additions & 1 deletion man/theme_pr.Rd

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

0 comments on commit 2bd7449

Please sign in to comment.