Created
March 14, 2021 19:15
-
-
Save juanchiem/ac12653621eacac5ef16c95860184b35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("tidyverse") | |
dat <- tibble::tribble( | |
~localidad, ~hibrido, ~inc_pc, ~sevm_pc, | |
"Napaleufú", "Syn3970", 0, 0, | |
"Napaleufú", "Z74L60", 18, 3.6, | |
"Napaleufú", "Adv5205", 4, 0.4, | |
"Fulton", "Syn3970", 0, 0, | |
"Fulton", "Z74L60", 30, 9, | |
"Fulton", "Adv5205", 15, 3, | |
"Pablo Acosta", "Adv5205", 5, 0.75, | |
"Pablo Acosta", "Z74L60", 15, 4.5, | |
"Pablo Acosta", "Syn3970", 1, 0.05 | |
) | |
p1 <- dat %>% | |
ggplot()+ | |
aes(x=reorder(hibrido, inc_pc, mean), y=inc_pc, col=localidad)+ | |
stat_summary(fun.data = "mean_cl_boot", colour = "gray70", size = 0.5)+ | |
geom_point()+ | |
coord_flip()+ | |
theme_bw()+ | |
labs(x="", y="Incidencia de PC-phomopsis", col="") | |
p2 <- dat %>% | |
ggplot()+ | |
aes(x=reorder(hibrido, sevm_pc, mean), y=sevm_pc, col=localidad)+ | |
stat_summary(fun.data = "mean_cl_boot", colour = "gray70", size = 0.5)+ | |
geom_point()+ | |
coord_flip()+ | |
theme_bw()+ | |
labs(x="", y="Severidad media de PC-phomopsis", col="") | |
library(patchwork) | |
combined <- p1 + p2 & theme(legend.position = "bottom") | |
combined + plot_layout(guides = "collect") | |
Author
juanchiem
commented
Mar 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment