Skip to content

Commit

Permalink
Merge pull request #1 from orichters/ku
Browse files Browse the repository at this point in the history
add strip_unit=FALSE to mipBarYearData and mipArea to avoid fails
  • Loading branch information
0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q authored Jul 9, 2024
2 parents 9d42b28 + 2720140 commit b91675c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/mipArea.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ mipArea <- function(x, stack_priority = c("variable", "region"), total = TRUE, s
# get the same order of colors for elements that are not defined in plotstyle.
if (!is.factor(x[[dimToStack]])) x[[dimToStack]] <- factor(x[[dimToStack]], levels = unique(x[[dimToStack]]))
# use plotstyle colours and labels by default
p <- p + scale_fill_manual(values = plotstyle(levels(x[[dimToStack]])),
p <- p + scale_fill_manual(values = plotstyle(levels(x[[dimToStack]]), strip_units = FALSE),
name = "")

# increase y-axis limits to hide all-zero data that was set to -1e-36
Expand Down
2 changes: 1 addition & 1 deletion R/mipBarYearData.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mipBarYearData <- function(x, colour = NULL, ylab = NULL, xlab = NULL, title = N
}

if (is.null(colour)) {
colour <- plotstyle(levels(x$variable))
colour <- plotstyle(levels(x$variable), strip_units = FALSE)
}

# make plot
Expand Down

0 comments on commit b91675c

Please sign in to comment.