2/12/2024 0 Comments Ggplot2 scatter plot two series![]() Mapping = aes( x = year, y = n, color = genus)) + geom_line() + labs( x = "Year", y = "Abundance", color = "Genera") Spp_count_plot <- ggplot( data = yearly_counts, Mapping = aes( x = genus, y = weight)) + geom_boxplot() + scale_y_log10() + labs( x = "Genus", y = "Weight (g)") + theme( = element_text( angle = 45, hjust = 1)) Spp_weight_boxplot <- ggplot( data = surveys_complete, Why does this change how R makes the graph? Consider changing the class of plot_id from integer to factor. Overlay the boxplot layer on a jitter layer to show actual measurements.Īdd color to the data points on your boxplot according to the plot from which the sample was taken ( plot_id). Try making a new plot to explore the distribution of another variable within each species.Ĭreate a boxplot for hindfoot_length. So far, we’ve looked at the distribution of weight within species.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |