Skip to content

Commit

Permalink
bug fix: plot(heart.fft, main = NA) yielded an error (as n_char was N…
Browse files Browse the repository at this point in the history
…A, rather than 0).
  • Loading branch information
hneth committed Sep 4, 2024
1 parent 5e2fc65 commit 7233196
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/util_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,11 @@ get_x_dev <- function(string, csf = .80){
# csf: constant scaling factor
# Returns a difference value that depends on string width (from min = .15 upwards).

n_char <- nchar(string)
if (!is.na(string)) {
n_char <- nchar(string)
} else {
n_char <- 0
}

if (n_char > 15){ # widen rectangle:

Expand Down

0 comments on commit 7233196

Please sign in to comment.