Skip to content

Commit

Permalink
add more options for strip locations
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Jan 17, 2017
1 parent 9895558 commit a2dfe8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/ggmatrix_gtable_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ plot_panel <- function(

# ask about strips
layout_names <- c("panel")
strip_right_name <- "strip-r"
strip_top_name <- "strip-t"
strip_right_name <- "strip-r|strip-l"
strip_top_name <- "strip-t|strip-b"
legend_name <- "guide-box"
all_layout_names <- c(layout_names, strip_right_name, strip_top_name, legend_name)

Expand Down Expand Up @@ -112,7 +112,7 @@ add_left_axis <- function(pmg, pg, show_strips, grob_pos) {
al <- layout[str_detect(layout_name, "axis-l"), ]

if (show_strips) {
alx <- layout[str_detect(layout_name, "axis-l|strip-t"), ]
alx <- layout[str_detect(layout_name, "axis-l|strip-t|strip-b"), ]
} else {
alx <- al
}
Expand All @@ -135,7 +135,7 @@ add_bottom_axis <- function(pmg, pg, show_strips, grob_pos) {
al <- layout[str_detect(layout_name, "axis-b"), ]

if (show_strips) {
alx <- layout[str_detect(layout_name, "axis-b|strip-r"), ]
alx <- layout[str_detect(layout_name, "axis-b|strip-r|strip-l"), ]
} else {
alx <- al
}
Expand Down

0 comments on commit a2dfe8e

Please sign in to comment.