Reputation: 1353
I am using the beeswarm
package in R and have some problems customizing individual datapoints. I am using below data and code.
library(beeswarm)
df <- data.frame(x = c(LETTERS), y = "1",
z = c(rnorm(26, 11, 4)))
beeswarm(z ~ y, data = df,
pwcol = c(1, rep(2, 25)), pwpch = c(1, rep(2, 25)), corral = "wrap", method = "center",
xlab = "", ylab = "variable", las=1
)
I would like to change this so that:
Could anyone help, please? Thank you.
Upvotes: 1
Views: 350
Reputation: 26650
You're almost there, you just need a couple of minor changes:
library(beeswarm)
df <- data.frame(x = c(LETTERS), y = "1",
z = c(rnorm(26, 11, 4)))
beeswarm(z ~ y, data = df,
pwcol = c("black", rep("grey15", 25)),
pwpch = c(23, rep(1, 25)),
pwbg = c("red", rep("transparent", 25)),
corral = "wrap", method = "center",
xlab = "", ylab = "variable",
las=1
)
Upvotes: 2