R/addline_format.R

Defines functions addline_format

Documented in addline_format

#'Plot multi-line axis labels
#'
#'\code{addline_format} Multi-line axis labels
#'
#'  
#'  
#'@return NULL
#'  
#' @examples
#' # 
#' ggplot(counts, aes(x=norm, y=value, fill=type)) +
#' geom_col() +
#' scale_x_discrete(labels=addline_format(c("FirstLine SecondLine", "Two-line Label")))
#' 
#'@export
addline_format <- function(x,...){
  gsub('\\s','\n',x)
}
jamesmartherus/martherus documentation built on April 12, 2020, 7:01 p.m.