Hi there,
I'm new to R and just need a little push in the right direction.
My code is as follows:
crickets_tidy <-
tidyr::gather(Weights,
key = stage,
value = time,
Antennate, Stridulate, Mount)
ggplot(crickets_tidy,
aes(x = Mass,
y = as.numeric(time)) +
geom_point(size = 3,
alpha = 1/2,
aes(colour= stage)) +
scale_y_continuous(breaks=seq(0, 650, 100)) +
labs( x = "Mass of female cricket(g)",
y = "Duration of stage (s)") +
facet_wrap(~stage,
labeller = as_labeller(c(
Antennate = "Antennation",
Stridulate = "Stridulation",
Mount = "Mounting"))) +
theme_minimal(base_size = 15)
crickets_tidier <- group_by(crickets_tidy, time,stage) %>%
summarise(meanmass = mean(Mass,na.rm = TRUE))
This comes out with this: https://imgur.com/a/sBqjBsY
Three queries here:
-
How do I swap the position of the Mounting and Stridulation sections? (So, L->R, Antennation, Stridulation, Mounting)
-
How do I remove the legend to the right detailing the colours?
-
Is there a way to make the three 'columns' more distinct from each other? Maybe seperated by thicker lines?
Many thanks!