Skip to content

Commit 1b2c30c

Browse files
committed
fallback for staplewidth in boxplot key
1 parent f468053 commit 1b2c30c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/legend-draw.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ draw_key_boxplot <- function(data, params, size) {
128128
lwd = params$box_gp$linewidth
129129
)
130130

131-
staple_size <- 0.5 + c(0.375, -0.375) * params$staplewidth
131+
staple_size <- 0.5 + c(0.375, -0.375) * (params$staplewidth %||% 0)
132132
staple <- gg_par(
133133
col = params$staple_gp$colour,
134134
lty = params$staple_gp$linetype,

0 commit comments

Comments
 (0)