Dear all,
I am working on the following dataset (300 rows not sure why I am not able to upload it using dput()
)
Here it is .
https://drive.google.com/file/d/1r-w5JvOij5t2sX5PRMx5ltYDPQ0Qpx6B/view?usp=sharing
It produces the following plot.
I'm wondering how I can reverse the colours so that fricative
becomes green and nasal
becomes orange-ish.
Here is my code so far.
sm %>% filter(manner!="stop", voicing!= "voiceless"|f_word_>6) %>% ggplot(aes(f_word_, est,group=smooth)) +
geom_ribbon(aes(ymin = lower_ci, ymax = upper_ci, fill=manner), alpha = 0.3) +
geom_line(aes(colour = manner, linetype=voicing)) +
theme(legend.position="top", legend.direction="horizontal", legend.box="horizontal", axis.text.x = element_text(angle = 45, hjust = 1), text=element_text(family="Times")) + xlab('Normalised time - coded for interval') + ylab('F0 estimated splines') +
scale_x_continuous(breaks=c(1,6.1,10), labels=c("closure mid","vowel onset","vowel mid")) + geom_vline(xintercept=6.1) +
guides(linetype = guide_legend(override.aes = list(colour='black')), manner = guide_legend(override.aes = list(colour='black'))) + theme_classic()+
theme(legend.position="top")
Thank you in advance!