Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert linetype NAs to blank lines #6270

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Next Next commit
Prevent NA linetype
  • Loading branch information
teunbrand committed Jan 6, 2025
commit 77a8140e538024379bc4e8cd57137f5f5644d704
3 changes: 3 additions & 0 deletions R/utilities-grid.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ gg_par <- function(..., stroke = NULL, pointsize = NULL) {
stroke[is.na(stroke)] <- 0
args$fontsize <- pointsize * .pt + stroke * .stroke / 2
}
if (!is.null(args$lty) && anyNA(args$lty)) {
args$lty[is.na(args$lty)] <- if (is.character(args$lty)) "blank" else 0
}

inject(gpar(!!!args))
}
Expand Down