@@ -59,14 +59,13 @@ ggplotly.ggmatrix <- function(p = ggplot2::last_plot(), width = NULL,
59
59
# conditioned on a column in a ggmatrix, the x-axis should be on the
60
60
# same scale.
61
61
s <- subplot(columnList , nrows = p $ nrow , margin = 0.01 , shareX = TRUE , titleY = TRUE )
62
- # if (i == 3) browser()
63
62
subplotList <- c(subplotList , list (s ))
64
63
}
65
- s <- subplot(subplotList , nrows = 1 )
64
+ s <- layout( subplot(subplotList , nrows = 1 ), width = width , height = height )
66
65
if (nchar(p $ title ) > 0 ) {
67
66
s <- layout(s , title = p $ title )
68
67
}
69
- layout( s , width = width , height = height )
68
+ hash_plot( pm $ data , plotly_build( s ) )
70
69
}
71
70
72
71
# ' @export
@@ -690,8 +689,8 @@ gg2list <- function(p, width = NULL, height = NULL, tooltip = "all", source = "A
690
689
l <- list (data = setNames(traces , NULL ), layout = compact(gglayout ))
691
690
# ensure properties are boxed correctly
692
691
l <- add_boxed(rm_asis(l ))
693
- l $ layout $ width <- width
694
- l $ layout $ height <- height
692
+ l $ width <- width
693
+ l $ height <- height
695
694
l $ source <- source
696
695
structure(l , class = " plotly_built" )
697
696
}
0 commit comments