I would like to define the color of each data point on a stripchart separately to add an extra information layer on the stripchart. I did not find a solution
I am aware of Different coloring of groups in R plot, and the answer suggests it is not possible per data point. Am I right?
A way around it could be to plot it column by column in a for loop, but then the x-positions are messed up
d = c (1,3,4);
e = c (2,3,4)
f = c (2,6,5)
data = list (d, e, f)
stripchart (data, vertical =T, pch =21, bg = 1, col=2)
Lets say, I would like to color primes in red, non-primes in blue. Or even and odd.
The most universal solution would take a color-list of same dimension as input, where each value defines the color of the corresponding data point plotted.