@@ -277,6 +277,7 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
277
277
theme [[" strip.text.x" ]] %|| % theme [[" strip.text" ]],
278
278
" npc" , " height"
279
279
)
280
+ panelMarginY <- panelMarginY + stripSize
280
281
# space for ticks/text in free scales
281
282
if (p $ facet $ free $ x ) {
282
283
axisTicksX <- unitConvert(
@@ -307,7 +308,6 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
307
308
rep(panelMarginX , 2 ),
308
309
rep(panelMarginY , 2 )
309
310
)
310
-
311
311
doms <- get_domains(nPanels , nRows , margins )
312
312
313
313
for (i in seq_len(nPanels )) {
@@ -414,7 +414,6 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
414
414
}
415
415
# facets have multiple axis objects, but only one title for the plot,
416
416
# so we empty the titles and try to draw the title as an annotation
417
- gglayout [[axisName ]]$ title <- " "
418
417
if (nchar(axisTitleText ) > 0 ) {
419
418
# npc is on a 0-1 scale of the _entire_ device,
420
419
# but these units _should_ be wrt to the plotting region
@@ -432,6 +431,11 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
432
431
}
433
432
}
434
433
}
434
+
435
+ if (has_facet(p )) {
436
+ gglayout [[axisName ]]$ title <- " "
437
+ }
438
+
435
439
} # end of axis loop
436
440
437
441
xdom <- gglayout [[lay [, " xaxis" ]]]$ domain
0 commit comments