po_area {d3po} | R Documentation |
Area
Description
Plot an area chart.
Usage
po_area(d3po, ..., data = NULL, inherit_daes = TRUE, stack = FALSE)
Arguments
d3po |
Either the output of |
... |
Aesthetics, see |
data |
Any dataset to use for plot, overrides data passed
to |
inherit_daes |
Whether to inherit aesthetics previous specified. |
stack |
Whether to stack the series. |
Value
an 'htmlwidgets' object with the desired interactive plot
Examples
# library(dplyr)
# dout <- pokemon %>%
# filter(
# type_1 == "water"
# ) %>%
# group_by(type_1, color_1) %>%
# reframe(
# probability = c(0, 0.25, 0.5, 0.75, 1),
# quantile = quantile(speed, probability)
# )
dout <- data.frame(
type_1 = rep("water", 5),
color_1 = rep("#6890F0", 5),
probability = c(0, 0.25, 0.5, 0.75, 1),
quantile = c(15, 57.25, 70, 82, 115)
)
d3po(dout) %>%
po_area(daes(
x = probability, y = quantile, group = type_1,
color = color_1
)) %>%
po_title("Sample Quantiles for Water Pokemon Speed")
[Package d3po version 0.5.5 Index]