Description Usage Arguments Value Note Author(s) Examples
ggplot wrapper for plotting ribbon, taking a stats string or function set as an argument
1 2 3 4 |
mapping |
a ggplot aesthetic mapping |
data |
data to pass to ggplot2::ggplot2::stat_summary functions |
show.counts |
True, False, "label" or "table" to display either as labels at each datapoint or as a table at the top of the plot |
fun.data |
argument to be passed to |
fun.args |
list of argumnets to be passed to
|
position |
PositionDodge object (constructed using
|
id |
|
... |
Arguments prefixed with the following
|
a ggpacket object that can be added to any ggplot to draw a collection of layers
When specifying arguments for wrapped ggplot geometries, prefix the
parameter with geometry specifiers: "ribbons" for ribbon geometry "line"
for central line geometry, or "label" for count labels. e.g.
ggpk_stat_line_errorbar(ribbons.alpha = 0.8, line.alpha = 0.6)
Doug Kelkhoff kelkhoff.douglas@gene.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(dplyr)
library(ggplot2)
nasa %>%
as.data.frame() %>%
mutate(date = as.Date(sprintf("%04d%02d01", year, month), "%Y%m%d")) %>%
mutate(hemisphere = ifelse(lat > 0,"Northern", "Southern")) %>%
mutate(temperature = temperature - 273) %>%
# plotting
ggplot() +
aes(x=date, y=temperature) +
ggpk_line_errorbar(fun.data = 'quartiles') +
facet_grid(hemisphere ~ .) +
labs(title="Temperature by Hemisphere")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.