🍑 Pomological plot theme for ggplot2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 line
3.5KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/scale_pomological.R
  3. \name{scale_pomological}
  4. \alias{scale_pomological}
  5. \alias{scale_colour_pomological}
  6. \alias{scale_color_pomological}
  7. \alias{scale_fill_pomological}
  8. \title{Pomological Color and Fill Scales}
  9. \usage{
  10. scale_colour_pomological(...)
  11. scale_color_pomological(...)
  12. scale_fill_pomological(...)
  13. }
  14. \arguments{
  15. \item{...}{
  16. Arguments passed on to \code{\link[ggplot2:discrete_scale]{ggplot2::discrete_scale}}
  17. \describe{
  18. \item{\code{aesthetics}}{The names of the aesthetics that this scale works with.}
  19. \item{\code{scale_name}}{The name of the scale that should be used for error messages
  20. associated with this scale.}
  21. \item{\code{palette}}{A palette function that when called with a single integer
  22. argument (the number of levels in the scale) returns the values that
  23. they should take (e.g., \code{\link[scales:hue_pal]{scales::hue_pal()}}).}
  24. \item{\code{name}}{The name of the scale. Used as the axis or legend title. If
  25. \code{waiver()}, the default, the name of the scale is taken from the first
  26. mapping used for that aesthetic. If \code{NULL}, the legend title will be
  27. omitted.}
  28. \item{\code{breaks}}{One of:
  29. \itemize{
  30. \item \code{NULL} for no breaks
  31. \item \code{waiver()} for the default breaks (the scale limits)
  32. \item A character vector of breaks
  33. \item A function that takes the limits as input and returns breaks
  34. as output
  35. }}
  36. \item{\code{labels}}{One of:
  37. \itemize{
  38. \item \code{NULL} for no labels
  39. \item \code{waiver()} for the default labels computed by the
  40. transformation object
  41. \item A character vector giving labels (must be same length as \code{breaks})
  42. \item A function that takes the breaks as input and returns labels
  43. as output
  44. }}
  45. \item{\code{limits}}{A character vector that defines possible values of the scale
  46. and their order.}
  47. \item{\code{expand}}{For position scales, a vector of range expansion constants used to add some
  48. padding around the data to ensure that they are placed some distance
  49. away from the axes. Use the convenience function \code{\link[ggplot2:expansion]{expansion()}}
  50. to generate the values for the \code{expand} argument. The defaults are to
  51. expand the scale by 5\% on each side for continuous variables, and by
  52. 0.6 units on each side for discrete variables.}
  53. \item{\code{na.translate}}{Unlike continuous scales, discrete scales can easily show
  54. missing values, and do so by default. If you want to remove missing values
  55. from a discrete scale, specify \code{na.translate = FALSE}.}
  56. \item{\code{na.value}}{If \code{na.translate = TRUE}, what value aesthetic
  57. value should missing be displayed as? Does not apply to position scales
  58. where \code{NA} is always placed at the far right.}
  59. \item{\code{drop}}{Should unused factor levels be omitted from the scale?
  60. The default, \code{TRUE}, uses the levels that appear in the data;
  61. \code{FALSE} uses all the levels in the factor.}
  62. \item{\code{guide}}{A function used to create a guide or its name. See
  63. \code{\link[ggplot2:guides]{guides()}} for more information.}
  64. \item{\code{position}}{For position scales, The position of the axis.
  65. \code{left} or \code{right} for y axes, \code{top} or \code{bottom} for x axes.}
  66. \item{\code{super}}{The super class to use for the constructed scale}
  67. }}
  68. }
  69. \description{
  70. Color scales based on the USDA Pomological Watercolors paintings.
  71. }
  72. \references{
  73. https://usdawatercolors.nal.usda.gov/pom
  74. }
  75. \seealso{
  76. \link[ggplot2:scale_colour_discrete]{ggplot2::scale_colour_discrete} \link[ggplot2:scale_fill_discrete]{ggplot2::scale_fill_discrete}
  77. }