Skip to content

Commit

Permalink
Update vignette and example
Browse files Browse the repository at this point in the history
  • Loading branch information
adayim committed Apr 13, 2024
1 parent bc183bd commit 89fe9bb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
18 changes: 9 additions & 9 deletions R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
#' parameters will be passed to corresponding elements of the forest plot.
#'
#' \itemize{
#' \item{\code{ci_*}}{Control the graphical parameters of confidence intervals}
#' \item{\code{legend_*}}{Control the graphical parameters of legend}
#' \item{\code{xaxis_*}}{Control the graphical parameters of x-axis}
#' \item{\code{refline_*}}{Control the graphical parameters of reference line}
#' \item{\code{vertline_*}}{Control the graphical parameters of vertical line}
#' \item{\code{summary_*}}{Control the graphical parameters of diamond shaped summary CI}
#' \item{\code{footnote_*}}{Control the graphical parameters of footnote}
#' \item{\code{title_*}}{Control the graphical parameters of title}
#' \item{\code{arrow_*}}{Control the graphical parameters of arrow}
#' \item \code{ci_*} Control the graphical parameters of confidence intervals
#' \item \code{legend_*} Control the graphical parameters of legend
#' \item \code{xaxis_*} Control the graphical parameters of x-axis
#' \item \code{refline_*} Control the graphical parameters of reference line
#' \item \code{vertline_*} Control the graphical parameters of vertical line
#' \item \code{summary_*} Control the graphical parameters of diamond shaped summary CI
#' \item \code{footnote_*} Control the graphical parameters of footnote
#' \item \code{title_*} Control the graphical parameters of title
#' \item \code{arrow_*} Control the graphical parameters of arrow
#' }
#'
#' See \code{\link[grid]{gpar}} for more details.
Expand Down
6 changes: 3 additions & 3 deletions inst/examples/forestplot-example.r
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(grid)
# Read provided sample example data
dt <- read.csv(system.file("extdata", "example_data.csv", package = "forestploter"))

Expand Down Expand Up @@ -25,9 +26,8 @@ dt$`HR (95% CI)` <- ifelse(is.na(dt$se), "",

# Define theme
tm <- forest_theme(base_size = 10,
refline_col = "red",
footnote_col = "#636363",
footnote_fontface = "italic")
refline_gp = gpar(col = "red"),
footnote_gp = gpar(col = "#636363", fontface = "italic"))

p <- forest(dt[,c(1:3, 8:9)],
est = dt$est,
Expand Down
6 changes: 3 additions & 3 deletions man/forest.Rd

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

18 changes: 9 additions & 9 deletions man/forest_theme.Rd

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

4 changes: 1 addition & 3 deletions vignettes/forestploter-intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ tm <- forest_theme(base_size = 10,
ci_lwd = 1.5,
ci_Theight = 0.2, # Set a T end at the end of CI
# Reference line width/type/color
refline_lwd = 1,
refline_lty = "dashed",
refline_col = "grey20",
refline_lwd = gpar(lwd = 1, lty = "dashed", col = "grey20"),
# Vertical line width/type/color
vertline_lwd = 1,
vertline_lty = "dashed",
Expand Down

0 comments on commit 89fe9bb

Please sign in to comment.