ggplot2-scales | R Documentation |
scale_color_jma_absolute(type = "precipitation", ...)
scale_color_jma_relative(type = "amedas", ...)
scale_fill_jma_absolute(type = "precipitation", ...)
scale_fill_jma_relative(type = "amedas", ...)
type |
Display item |
... |
Arguments to pass on to ggplot2::scale_color_gradientn or ggplot2::scale_fill_gradientn |
A ScaleContinuous
object that can be added to a ggplot
object
d <-
data.frame(
date = as.Date(c(17410, 17411, 17412, 17413, 17414, 17415), origin = "1970-01-01"),
precipitation_sum = units::set_units(c(3.5, 9.5, 0, 0, 0, 5), "mm"))
library(ggplot2)
library(units)
ggplot(d, aes(date, precipitation_sum,
color = drop_units(precipitation_sum),
fill = drop_units(precipitation_sum))) +
geom_bar(stat = "identity") +
scale_color_jma_absolute(type = "precipitation") +
scale_fill_jma_absolute(type = "precipitation")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.