I want to make a vertical strip chart in R but I want the plotted points to be weighted so that points with greater weights appear bigger. Normally I'd use cex or symbols() but I have 86 points, so these make the points overlap onto each other and hard to distinguish.
Thus, I'd like to use horizontal lines as my points and to have those lines be longer, but not thicker, as weight increases. Histogram also seems to not be good here but maybe I'm just missing something.
This code builds some sample data that looks like mine:
freqs <- c(15, 50, 110, 13, 290, 13, 14, 12, 66, 48)
scores <- c(2.1, 1.4, 2.2, 0.9, 0.9, 1.0, 1.0, 1.1, 2.5, 1.6)
mydata <- data.frame(scores, freqs)
And this code produces a strip chart that is close to what I'm looking for but doesn't elongate the "-" points based on freqs:
par("mar")
par(mar=c(1,1,1,1))
stripchart(mydata$scores
, vertical = TRUE
, ylim = c(0.5,3.5)
, pch = "-"
)