Description Usage Arguments Details Value Examples
View source: R/plot_aggregates.R
subplotly
plots multi-trace subplots with plotly.
1 2 3 4 5 6 7 8 9 10 |
df |
A data.frame. |
in_var |
A character or (named) charactor vector. Character of the columns to be used for independent variable, typically x axis in "vertical" orientation. |
de_var |
A character, or (named) charactor vector, or (named) list of character vector. The structure will determine how the dependent variables are arranged into multi-axis subplots, typically y axis in "vertical" orientation. |
groupby_var |
A character, or character vector. Character of the column(s) to be used for grouping, currently implemented by linetype. |
plot_type |
Named list for plotly type, mode, etc. |
orientation |
"v" or "h", for "vertical" and "horizontal". v (vertical) is the common x/y arrangement e.g. top edge, h (horizontal) is the uncommon x/y arrangement e.g. right edge. |
margin |
float. margin argument in subplot call. |
return_type |
"subplot" or "list". return_type should be subplot or list of plots. |
This is a function to plot multi-trace subplots using plotly package. Multiple dependent variables are plot agains multiple independent variables. Dependent variables can be organized/combined in different subplots. Groupby variable and plot types can be controlled. The plots can be both vertical (default) and horizontal orientations. It can return either subplots or a list of plotly objects.
A plotly (subplot) object or a list of plotly objects depending on return_type. The subplot is ncol = length(in_var), nrow = length(de_var)
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.