🍑 Pomological plot theme for ggplot2
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

84 lines
2.4KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/theme_pomological.R
  3. \name{theme_pomological}
  4. \alias{theme_pomological}
  5. \alias{theme_pomological_nobg}
  6. \title{Pomological Theme}
  7. \usage{
  8. theme_pomological(base_family = "Homemade Apple", base_size = 16,
  9. text.color = NULL, plot.background.color = NULL,
  10. panel.grid.color = NULL, panel.grid.linetype = "dashed",
  11. axis.text.color = NULL, axis.text.size = base_size * 14/16,
  12. base_theme = ggplot2::theme_minimal())
  13. theme_pomological_nobg(...)
  14. }
  15. \arguments{
  16. \item{base_family}{Base text family}
  17. \item{base_size}{Base text size}
  18. \item{text.color}{Color of all text (except axis text, see \code{axis.text.color})}
  19. \item{plot.background.color}{Color of plot background, passed to \code{plot.background}}
  20. \item{panel.grid.color}{Color of panel grid, passed to \code{panel.grid}}
  21. \item{panel.grid.linetype}{Linetype of panel grid, passed to \code{panel.grid}}
  22. \item{axis.text.color}{Color of axis text}
  23. \item{axis.text.size}{Size of axis text}
  24. \item{base_theme}{Starting theme of plot, default is
  25. \code{\link[ggplot2:theme_minimal]{ggplot2::theme_minimal()}}. Any elements set by \code{theme_pomological()} will
  26. overwrite the \code{base_theme} unless the specific parameter is explicitly set
  27. to \code{NULL}.}
  28. }
  29. \description{
  30. \link{ggplot2} plot theme based on the USDA Pomological Watercolors paintings.
  31. }
  32. \section{Functions}{
  33. \itemize{
  34. \item \code{theme_pomological_nobg}: Pomological theme with white (transparent) background
  35. }}
  36. \section{Fonts}{
  37. Complete the pomological watercolor theme with a handwriting or cursive font.
  38. The following fonts from \href{https://fonts.google.com}{Google Fonts} work well.
  39. Visit the links below to install on your system.
  40. \itemize{
  41. \item \href{https://fonts.google.com/specimen/Homemade+Apple/}{Homemade Apple}
  42. \item \href{https://fonts.google.com/specimen/Amatic+SC/}{Amatic SC}
  43. \item \href{https://fonts.google.com/specimen/Mr+Bedfort/}{Mr. Bedfort}
  44. }
  45. }
  46. \examples{
  47. library(ggplot2)
  48. basic_iris_plot <- ggplot(iris) +
  49. aes(x = Sepal.Length, y = Sepal.Width, color = Species) +
  50. geom_point(size = 2)
  51. # Pomological Theme
  52. basic_iris_plot + theme_pomological()
  53. # Don't change panel grid color
  54. basic_iris_plot +
  55. theme_pomological(
  56. panel.grid.color = NULL
  57. )
  58. # White background
  59. basic_iris_plot +
  60. theme_pomological_nobg()
  61. }
  62. \references{
  63. https://usdawatercolors.nal.usda.gov/pom
  64. }
  65. \seealso{
  66. \link[ggplot2:theme]{ggplot2::theme}
  67. }