Skip to content

Commit c7a723f

Browse files
committed
Merge branch 'teunbrand-fix_revdep_problem'
2 parents a564ed5 + 7fb237c commit c7a723f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

R/axis_combmatrix.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,13 @@ render_comb_axis <- function(self, panel_params, axis=c("primary", "secondary"),
217217
)
218218

219219
nticks <- length(at)
220+
ticks_length <- calc_element(paste0("axis.ticks.length.x.", position), theme)
220221
ticks <- switch(position,
221222
top = element_render(theme, "axis.ticks.x.top", x = rep(at, each = 2),
222-
y = rep(unit.c(zero, theme$axis.ticks.length), nticks),
223+
y = rep(unit.c(zero, ticks_length), nticks),
223224
id.lengths = rep(2, nticks)),
224225
bottom = element_render(theme, "axis.ticks.x.bottom", x = rep(at, each = 2),
225-
y = rep(unit.c(one - theme$axis.ticks.length, one), nticks),
226+
y = rep(unit.c(one - ticks_length, one), nticks),
226227
id.lengths = rep(2, nticks))
227228
)
228229

@@ -272,11 +273,11 @@ render_comb_axis <- function(self, panel_params, axis=c("primary", "secondary"),
272273

273274
if(position == "bottom"){
274275
gt <- gtable_col("axis", grobs = list(ticks, axis_repl),
275-
width = one, heights = unit.c(theme$axis.ticks.length, label_height))
276+
width = one, heights = unit.c(ticks_length, label_height))
276277
justvp <- viewport(y = 1, just = "top", height = gtable_height(gt))
277278
}else{
278279
gt <- gtable_col("axis", grobs = list(axis_repl,ticks),
279-
width = one, heights = unit.c(label_height, theme$axis.ticks.length))
280+
width = one, heights = unit.c(label_height, ticks_length))
280281
justvp <- viewport(y = 0, just = "bottom", height = gtable_height(gt))
281282
}
282283

0 commit comments

Comments
 (0)