I am trying to depict the mean crude protein content (y-axis) of 10 plants by growth stage (x-axis) and then facet by each individual species. There are 10 species I want to depict in the fashion, and then on each facet I also want to show the data for 2 "benchmark" species for comparison. The data for the 10 faceted species are in a separate dataframe from the 2 benchmark species but all column headers are the same between both dataframes.
ggplot() +
geom_point(data = ten_spp_growth_stage, aes(x = growth_stage_corrected, y = mean_CP), group = 1, size = 2) +
geom_line(data = ten_spp_growth_stage, aes(x = growth_stage_corrected, y = mean_CP), group = 1) +
geom_errorbar(data = ten_spp_growth_stage, aes(x = growth_stage_corrected, ymin = mean_CP - CP_se, ymax = mean_CP +
CP_se), width = 0.2) +
geom_point(data = grass_CP_df, aes(x = growth_stage_corrected, y = mean_CP, group = 1, col = sci_name_corrected)) +
geom_line(data = grass_CP_df, aes(x = growth_stage_corrected, y =
mean_CP, group = 1, col = sci_name_corrected)) +
theme(legend.position = "bottom") + ylab("Mean crude protein (%) ± SEM") + xlab("Growth stage") +
theme_bw() + theme(panel.grid.minor = element_blank()) +
theme(legend.title = element_blank(), legend.position = "bottom",
axis.text.x = element_text(size = 9, angle = 45, color = "black", hjust = 1), axis.text.y = element_text(size = 12, color="black"), axis.title.x = element_text(size = 12, color="black"), axis.title.y = element_text(size = 12, color="black")) +
facet_wrap(facets = ~ reorder(sci_name_corrected, desc(mean_CP)), nrow = 2)
So far I have made the facetted figure but am unable to get the 2 curves for the "benchmark" species to repeat themselves within each facet. Rather, they are showing up as additional, separate facets (the last two species that are colored blue and red). What I want is for the blue and red curves to both be repeated in the facet for each of the other 10 species not show up as facets 11 and 12.