From e79ca018e2b19f871787a8dc3e027ef0c45de278 Mon Sep 17 00:00:00 2001 From: Oleh Khoma-ext Date: Tue, 8 Sep 2020 12:07:57 +0200 Subject: [PATCH] Fixed typo - calculcations of shared Y axis was using X axes --- R/subplots.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/subplots.R b/R/subplots.R index de4925c676..e672e4d7b1 100644 --- a/R/subplots.R +++ b/R/subplots.R @@ -167,7 +167,7 @@ subplot <- function(..., nrows = 1, widths = NULL, heights = NULL, margin = 0.02 if (length(unique(yAxisN)) > 1) { warning("Must have a consistent number of axes per 'subplot' to share them.") } else { - yAxisID <- rep(rep(seq_len(nrows * unique(xAxisN)), each = ncols, length.out = length(plots)), unique(yAxisN)) + yAxisID <- rep(rep(seq_len(nrows * unique(yAxisN)), each = ncols, length.out = length(plots)), unique(yAxisN)) } } # current "axis" names