mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-26 19:52:42 +00:00
invisibly return component plots (#11)
This will make it easier for users to change the theme or other aspects of the plots, and shouldn't affect any existing behavior because the returned object is invisible.
This commit is contained in:
parent
f89faf2c6a
commit
3548546b65
1 changed files with 3 additions and 0 deletions
|
|
@ -919,6 +919,8 @@ plot.prophet <- function(x, fcst, uncertainty = TRUE, xlabel = 'ds',
|
|||
#' @param uncertainty Boolean indicating if the uncertainty interval should be
|
||||
#' plotted for the trend, from fcst columns trend_lower and trend_upper.
|
||||
#'
|
||||
#' @return Invisibly return a list containing the plotted ggplot objects
|
||||
#'
|
||||
#' @export
|
||||
#' @importFrom dplyr "%>%"
|
||||
prophet_plot_components <- function(m, fcst, uncertainty = TRUE) {
|
||||
|
|
@ -945,6 +947,7 @@ prophet_plot_components <- function(m, fcst, uncertainty = TRUE) {
|
|||
print(panels[[i]], vp = grid::viewport(layout.pos.row = i,
|
||||
layout.pos.col = 1))
|
||||
}
|
||||
return(invisible(panels))
|
||||
}
|
||||
|
||||
#' Plot the prophet trend.
|
||||
|
|
|
|||
Loading…
Reference in a new issue