Skip to content

Commit

Permalink
Check fixes for plotting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Feb 9, 2024
1 parent b0330e6 commit a2353d1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ build_fbl_layer <- function(object, data = NULL, level = c(80, 95),

out <- list()
object <- object %>%
dplyr::mutate_if(~inherits(., "agg_vec"), compose(trimws, format)) |>
mutate(.model = factor(.model))
dplyr::mutate_if(~inherits(., "agg_vec"), compose(trimws, format))

key_glyph_rect <- function (data, params, size) {
data$alpha <- data$alpha %||% NA
Expand All @@ -331,14 +330,14 @@ build_fbl_layer <- function(object, data = NULL, level = c(80, 95),
(scales::seq_gradient_pal(attr(amount, "from") %||% "white", color))(amount %||% NA)
}, data$fill, data$fill_ramp)
}
draw_key_rect(data, params, size)
ggplot2::draw_key_rect(data, params, size)
}

# Add forecast interval ribbons to plot
if(!is.null(level)){
intvl_mapping <- mapping
intvl_mapping$dist <- sym(response_vars(object))
intvl_mapping$fill_ramp <- intvl_mapping$colour_ramp <- expr(stat(level))
intvl_mapping$fill_ramp <- intvl_mapping$colour_ramp <- expr(after_stat(level))
intvl_mapping$fill <- intvl_mapping$colour <- col

if(!is.null(col)){
Expand Down

0 comments on commit a2353d1

Please sign in to comment.