Created
March 13, 2021 11:58
-
-
Save juanchiem/f9d2879328e6b5724c4b8be3eb0d3eee 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
dat <- tibble::tribble( | |
~fila, ~col, ~plot, ~trt, ~yield, | |
1, 1, 1, 1, 5879, | |
1, 2, 2, 2, 6278, | |
1, 3, 3, 3, 6114, | |
2, 1, 6, 2, 5965, | |
2, 2, 5, 3, 6208, | |
2, 3, 4, 1, 6179, | |
3, 1, 7, 3, 6833, | |
3, 2, 8, 1, 5904, | |
3, 3, 9, 2, 6020 | |
) | |
dat %>% | |
ggplot(aes(x=fila, y=col, fill= yield)) + | |
geom_tile() + | |
geom_text(aes(label = paste0("T", trt, "\n#", plot )), | |
col = "white", size = 3) + | |
viridis::scale_fill_viridis(direction = -1, | |
breaks=dput(range(dat$yield)), | |
labels=dput(floor(range(dat$yield))), | |
)+ | |
labs(fill = "Rendimiento \n(kg/ha)" , | |
title = "Field wheat experiment...") + | |
theme_void()+ | |
theme(plot.title = element_text(hjust = 0.5)) |
Author
juanchiem
commented
Mar 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment