Skip to content

Commit

Permalink
Fix check failures after main merge
Browse files Browse the repository at this point in the history
  • Loading branch information
grantmcdermott committed Feb 14, 2024
1 parent 8431eb7 commit 914e474
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 7 additions & 5 deletions R/draw_legend.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' @importFrom utils modifyList
#' @examples
#'
#' op = par()
#' oldmar = par("mar")
#'
#' draw_legend(
#' legend = "right!", ## default (other options incl, "left(!)", ""bottom(!)", etc.)
Expand Down Expand Up @@ -59,7 +59,7 @@
#' par("mar")
#'
#' # To reset you should call `dev.off()` or just reset manually.
#' par(op)
#' par(mar = oldmar)
#'
#' # Note that the inner and outer margin of the legend itself can be set via
#' # the `lmar` argument. (This can also be set globally via
Expand All @@ -74,7 +74,7 @@
#' )
#' box("figure", col = "cyan", lty = 4)
#'
#' par(op)
#' par(mar = oldmar)
#'
#' # Continuous (gradient) legends are also supported
#' draw_legend(
Expand All @@ -85,7 +85,7 @@
#' gradient = TRUE ## enable gradient legend
#' )
#'
#' par(op)
#' par(mar = oldmar)
#'
#' @export
draw_legend = function(
Expand Down Expand Up @@ -157,7 +157,9 @@ draw_legend = function(
if (type %in% c("ribbon", "polygon") || isTRUE(gradient)) {
if (is.null(legend.args[["pch"]])) legend.args[["pch"]] = 22
if (is.null(legend.args[["pt.cex"]])) legend.args[["pt.cex"]] = 3.5
if (is.null(legend.args[["pt.lwd"]]) && type != "polygon") legend.args[["pt.lwd"]] = 0
if (is.null(legend.args[["pt.lwd"]]) && (!is.null(type) && type != "polygon")) {
legend.args[["pt.lwd"]] = 0
}
if (is.null(legend.args[["y.intersp"]])) legend.args[["y.intersp"]] = 1.25
if (is.null(legend.args[["seg.len"]])) legend.args[["seg.len"]] = 1.25
}
Expand Down
6 changes: 3 additions & 3 deletions R/tinyplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -1249,9 +1249,9 @@ tinyplot.default = function(
polygon(
x = xx,
y = yy,
border = col[i],
col = bg[i],
lty = lty[i]
border = icol,#col[i],
col = ibg,#bg[i],
lty = ilty,#lty[i]
)
} else {
stop("`type` argument not supported.", call. = FALSE)
Expand Down
8 changes: 4 additions & 4 deletions man/draw_legend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 914e474

Please sign in to comment.