grantmcdermott · GitHub

Caught while stress testing #613.

  1. First case: histogram xlab = NA (only when x is a factor).
# plt(~Species, iris, theme = "dynamic", type = "hist") ## fine
# plt(~Petal.Width, iris, theme = "dynamic", type = "hist", xlab = NA) ## also fine
plt(~Species, iris, theme = "dynamic", type = "hist", xlab = NA) ## error
#> Error in `if (is.null(xlab) || xlab == "Index") ...`:
#> ! missing value where TRUE/FALSE needed
  1. Second case: spineplot ylab = NA leads to incorrect margin spacing (y labels get clipped).
# plt(Species ~ Sepal.Length, iris, theme = "dynamic", type = "spineplot"); box("figure") ## fine
plt(Species ~ Sepal.Length, iris, theme = "dynamic", type = "spineplot", ylab = NA); box("figure") ## error

  1. UPDATE: Actually, xlab = NA for spineplot doesn't work properly either
plt(Species ~ Sepal.Length, iris, theme = "dynamic", xlab = NA); box("figure")

Read the original on github.com ↗