@@ -217,12 +217,13 @@ render_comb_axis <- function(self, panel_params, axis=c("primary", "secondary"),
217
217
)
218
218
219
219
nticks <- length(at )
220
+ ticks_length <- calc_element(paste0(" axis.ticks.length.x." , position ), theme )
220
221
ticks <- switch (position ,
221
222
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 ),
223
224
id.lengths = rep(2 , nticks )),
224
225
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 ),
226
227
id.lengths = rep(2 , nticks ))
227
228
)
228
229
@@ -272,11 +273,11 @@ render_comb_axis <- function(self, panel_params, axis=c("primary", "secondary"),
272
273
273
274
if (position == " bottom" ){
274
275
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 ))
276
277
justvp <- viewport(y = 1 , just = " top" , height = gtable_height(gt ))
277
278
}else {
278
279
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 ))
280
281
justvp <- viewport(y = 0 , just = " bottom" , height = gtable_height(gt ))
281
282
}
282
283
0 commit comments