grantmcdermott · GitHub

Fixes #319. Looking at the issue I posted earlier, it appears that the jitter plot is internally referenced as "p" type. While my knowledge of this codebase is next to nothing, I don't believe there should be unintended consequences of this change because "p" should only include points. The changes allow for the legend to pick up the lwd argument in the case that the pch used during plotting can be impacted by that value. Happy to hear more if I have misunderstood this :)

set.seed(0)
x <- rep(c("A", "B", "C"), each = 20)
y <- runif(60)
gp <- sample(c("X", "Y", "Z"), size = 60, replace = TRUE)
df <- data.frame(x, y, gp)
library(tinyplot)
utils::packageVersion("tinyplot")
#> [1] '0.3.0.99'
plt(
  y ~ x | gp,
  data = df,
  pch = 0:2,
  lwd = 4,
  type = type_jitter()
)

Read the original on github.com ↗