e_histogram {echarts4r} | R Documentation |
Histogram & Density
Description
Add a histogram or density plots.
Usage
e_histogram(
e,
serie,
breaks = "Sturges",
name = NULL,
legend = TRUE,
bar_width = "99%",
x_index = 0,
y_index = 0,
...
)
e_density(
e,
serie,
breaks = "Sturges",
name = NULL,
legend = TRUE,
x_index = 0,
y_index = 0,
smooth = TRUE,
...
)
e_histogram_(
e,
serie,
breaks = "Sturges",
name = NULL,
legend = TRUE,
bar_width = "90%",
x_index = 0,
y_index = 0,
...
)
e_density_(
e,
serie,
breaks = "Sturges",
name = NULL,
legend = TRUE,
x_index = 0,
y_index = 0,
smooth = TRUE,
...
)
Arguments
e |
An |
serie |
Column name of serie to plot. |
breaks |
Passed to |
name |
name of the serie. |
legend |
Whether to add serie to legend. |
bar_width |
Width of bars. |
x_index , y_index |
Indexes of x and y axis. |
... |
Any other option to pass, check See Also section. |
smooth |
Whether to use smoothed lines, passed to |
See Also
Additional arguments for histogram, Additional arguments for density
Examples
mtcars |>
e_charts() |>
e_histogram(mpg, name = "histogram") |>
e_density(mpg, areaStyle = list(opacity = .4), smooth = TRUE, name = "density", y_index = 1) |>
e_tooltip(trigger = "axis")
# timeline
mtcars |>
group_by(cyl) |>
e_charts(timeline = TRUE) |>
e_histogram(mpg, name = "histogram") |>
e_density(mpg, name = "density", y_index = 1)
[Package echarts4r version 0.4.5 Index]