The results from each glass type can be identified by the colour, the marker shape and the line type, making it colourblind-friendly and also suitable to be printed in gray-scale. The plot shows the means, the standard deviation and the compact letter display for each treatment. Reference Data Gives continuous x-axis but all groups are combined. This scatterplot is suitable for any presentation and also for written reports. Grouping x-axis in scatter plot Ask Question Asked 1 year, 3 months ago Modified 8 months ago Viewed 1k times 3 I am trying to plot one scatter plot for each group, where each group has continous values in x-axis. # coloured scatterplot ggplot(data_summary, aes(Temp, mean, color = Glass)) + geom_point( aes( shape = Glass), position= position_dodge( width= 5), alpha= 0.4, size = 3) + geom_line( aes( linetype = Glass), position= position_dodge( width= 5)) + geom_errorbar( aes( ymin=mean -sd, ymax=mean +sd), position= position_dodge( width= 5), width = 5, show.legend = FALSE) + labs( x= "Temperature (˚C)", y= "Light Output") + theme_bw() + theme( = element_blank(), = element_blank()) + theme( legend.position = c( 0.1, 0.7)) + geom_text( aes( label=Tukey), size = 3, position = position_dodge( width= 5), vjust= 1.5, show.legend = FALSE) + scale_x_continuous( breaks= c( 100, 125, 150)) + scale_y_continuous( limits= c( 450, 1450), breaks= seq( 500, 1400, 300)) + scale_color_brewer( palette = "Dark2") If you prefer a video-tutorial, you can watch the tutorial Publication-Quality Scatterplots for Two Factors with ggplot – Two-Way ANOVA with R – tutorial 4 at my YouTube channel. You can download the csv file with the summarised data or you can follow the Two-Way ANOVA in R – Step-by-Step Tutorial to build it. To build the scatterplots, we are going to use the summarised data, with the mean, the standard deviation and the letters indicating significant differences by Tukey’s test (compact letter display). The data 1 presents the results of an experiment conducted to study the influence of the operating temperature (100˚C, 125˚C and 150˚C) and three faceplate glass types (A, B and C) in the light output of an oscilloscope tube. In this tutorial we are going to see how to build a high-quality scatterplot for two explanatory variables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |