Is it possible to draw a beeswarm plot such that point-wise colors are aligned in the horizontal center? (I believe this would improve the readability a lot especially if the data is not as clear-cut as in the example.)
To achieve this plot with centered colors:
beeswarm(breast$time_survival, pch = 16, pwcol = 1 + breast$event_survival, method='center')
I tried:
beeswarm(breast$time_survival, pch = 16, method='center')
beeswarm(breast[breast$event_survival==1,]$time_survival, pch = 16, col=2, method='center', add=T)
It's close, but the individual points on the individual plots are not precisely the same.
I think you were on the right track. Here's one approach:
The key parameter is "side", which forces the swarms to expand in only one direction.
For the "at" parameter, I used "xinch(0.04)" because this is half of the default space between points (assuming you haven't changed cex or spacing).