Color stripchart according to column (3 objects)

[quote="jrkrideau, post:16, topic:153051"]
I think I have outsmarted myself.

I may be making some progress. I think I have a working graph


library(ggplot2)

mycols  <- c("#1B9E77", "#D95F02", "#7570B3", "#E7298A", "#66A61E", "#E6AB02", "#A6761D", 
             "#666666", "#1B9E77", "#D95F02", "#7570B3", "#E7298A", "#66A61E")

p1  <- ggplot(dat1, aes(State, Interception, colour = State)) + 
          geom_boxplot() +
          geom_jitter(aes(colour = Donor)) + 
         guides(colour  = "none") +
          annotate(geom="text", x = 10, y=45, label="Donor 1", color="#1B9E77") +
          annotate(geom="text", x = 10, y=44, label="Donor 2", color="#D95F02") +
          annotate(geom="text", x = 10, y=43, label="Donor 2", color="#7570B3")

p1 +   scale_color_manual(values= mycols)

1 Like