This is a follow up question to my previous question here..
This is my current code for the subsetted dataset in the previous question.
pc <- read.csv("mat.csv", header = T)
rda <- dbrda(pc[,9:66] ~ Chlorophyll + Temp + Sal, pc[,1:5], dist = "bray") %>%
scores(tidy = TRUE) %>%
split(.[["score"]])
ggplot(rda$sites, aes(dbRDA1, dbRDA2)) +
geom_mark_ellipse(aes(dbRDA1, dbRDA2, fill=pc$Station), alpha=0.2, size=0.1, linetype=2) +
geom_point(aes(shape = pc$Station, colour = as.factor(pc$Hours), size = pc$Treatment), alpha=0.7) +
scale_size_discrete(range = c(3, 6)) +
geom_textsegment(aes(x = 0, y = 0, xend = dbRDA1, yend = dbRDA2,
label = label), data = rda$biplot, vjust = 3,
arrow = arrow(25, unit(0.15, "inches")), size = 4, colour = "grey50") +
scale_colour_manual('Hours', values = colours) +
scale_shape_manual("Station", values = c(16, 17, 18)) +
scale_fill_manual(values = c("#0d0887", "#cc4778", "#f0f921")) +
coord_equal() +
geom_hline(yintercept = 0, color = "gray", linetype = 2) +
geom_vline(xintercept = 0, color = "gray", linetype = 2) +
guides(shape = guide_legend(override.aes = list(size = 5))) +
guides(colour = guide_legend(override.aes = list(size = 5))) +
theme_bw()
I currently have 'size = Treatment' as a differentiator between the 2 treatments, but it's hard to see the smaller ones. Is it possible to have 2 'scale_shape_manual' specifications? I want to keep the different shapes for the different stations, but would like to have a black outline around the one treatment and keep the other treatment as is, and have both be the same size. I've tried specifying the different shapes of the solid colours (15 - 19) and the ones you can colour in (21 - 25) but it overrides the previous shape.