Publication-Quality Scatterplots for Two Factors with ggplot - Two-Way ANOVA with R - tutorial 4
ฝัง
- เผยแพร่เมื่อ 24 ก.ค. 2024
- R code: statdoe.com/scatterplot-for-t...
Welcome to the series of tutorials on Two-way ANOVA with R.
In this series of videos, we are going to perform a complete analysis of a two-factor factorial design.
We are going to cover the following steps :
Video tutorial 1 ( • Two-Way ANOVA with R -... ):
- build a simple plot for data visualisation;
- perform the analysis of variance;
Video tutorial 2 ( • Tukey's Test and Lette... ):
- create a table with the mean and standard deviation of each treatment;
- compare the means by Tukey’s test;
- use the compact letter display to indicate significant differences;
Video tutorial 3 ( • Publication-Quality Ba... ):
- build a high-quality publication-grade bar plot,
Video tutorial 4:
- build a high-quality publication-grade scatter plot.
Packages: ggplot2
Main functions: ggplot, geom_point, geom_line, geom_errorbar, position_dodge, dodge, legend.position, geom_text, scale_color_brewer, ggsave, scale_x_continuous, scale_y_continuous, breaks, seq, limits .
www.statdoe.com - วิทยาศาสตร์และเทคโนโลยี
Dear Rosane,
You just saved my life. Thank you so much. I don't need to use graphpad prism anymore.
Hey Rosane, thanks a lot for this awesome tutorial, the final plot looks great! As an additional hint: The scale_fill_grey and scale_colour_grey functions turned out to be very useful to me, since scientific journals often require graphics without colors. Regards, Joachim
Hi Joachim. Thanks for the hint; I will add the step in the tutorial on the website that I hope will be ready soon. In fact, I used to build only grey-scale plots, exactly for this reason. However, as all scientific journals are migrating to electronic versions, recently I am encouraging my students to build coloured plots that also work when printed in grey-scale. Best, Rosane.
Very useful. Thanks a lot.
Glad to hear that
thanks, very useful
Glad it was helpful!
Hello Rosane
Could you please help me to run this code: ggplot(data_summary, aes(x = factor(NaCl), y = mean, fill = Varieties, color = Varieties)) + geom_line()
While running this I can't find lines instead I am getting this: geom_path: Each group consists of only one observation. Do you need to adjust the group
aesthetic?
Hi this is very useful but I need to understand how we can interpret the a,b,c values of Tuckey test. Many thanks for your tutorials
Can you please tell me how I can change the order of Legend? I have 4 different plant lines, I want WT, Knockout, Transgenic 1 and Transgenic 2, but it is appearing as Knockout, Transgenic 1, Transgenic 2 and WT.