Skip to content

Commit 4df60ed

Browse files
clarified the new behaviour of omitting items from legend_order.
fixed namespace issue with added unit and margin use. refreshed docs
1 parent 021aa76 commit 4df60ed

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

R/forest_plot.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ which0 <- function(x) {
2626
#' @param interval_legend_text Pointinterval Legend text.
2727
#' @param legend_order Legend order. A four-element vector with the following
2828
#' items ordered in your desired order: "pointinterval", "ref", "area", "shape".
29+
#' if an item is absent the legend will be omitted.
2930
#' @param combine_area_ref_legend Combine reference and area legends if they
3031
#' share the same text?
3132
#' @param show_ref_area Show reference window?
@@ -355,8 +356,8 @@ forest_plot <- function(
355356
panel.grid.major = ggplot2::element_line(colour = "gray", linetype = "solid"),
356357
strip.background = ggplot2::element_rect(fill = strip_col),
357358
strip.placement = strip_placement,
358-
legend.spacing.x = unit(legend_space_x_mult*11, "pt"),
359-
legend.margin = margin(t = 0, r = 0.1, l = -0.1, b = 0, unit='cm')
359+
legend.spacing.x = ggplot2::unit(legend_space_x_mult*11, "pt"),
360+
legend.margin = ggplot2::margin(t = 0, r = 0.1, l = -0.1, b = 0, unit='cm')
360361
) +
361362
ggplot2::ggtitle("\n") +
362363
ggplot2::xlab(xlabel) +

man/forest_plot.Rd

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)