View source: R/distribution_plot.R
| distribution_plot | R Documentation |
Draws how state proportions (or counts) evolve across time points. For
each time column, tabulates how many sequences are in each state and
renders the result as a stacked area (default) or stacked bar chart.
Accepts the same inputs as sequence_plot.
distribution_plot(
x,
group = NULL,
scale = c("proportion", "count"),
geom = c("area", "bar"),
na = TRUE,
state_colors = NULL,
na_color = "grey90",
frame = FALSE,
width = NULL,
height = NULL,
main = NULL,
show_n = TRUE,
time_label = "Time",
xlab = NULL,
y_label = NULL,
ylab = NULL,
tick = NULL,
ncol = NULL,
nrow = NULL,
legend = c("right", "bottom", "none"),
legend_size = NULL,
legend_title = NULL,
legend_ncol = NULL,
legend_border = NA,
legend_bty = "n"
)
x |
Wide-format sequence data ( |
group |
Optional grouping vector (length |
scale |
|
geom |
|
na |
If |
state_colors |
Vector of colours, one per state. Defaults to Okabe-Ito. |
na_color |
Colour for the |
frame |
If |
width, height |
Optional device dimensions. See
|
main |
Plot title. |
show_n |
Append |
time_label |
X-axis label. |
xlab |
Alias for |
y_label |
Y-axis label. Defaults to |
ylab |
Alias for |
tick |
Show every Nth x-axis label. |
ncol, nrow |
Facet grid dimensions. |
legend |
Legend position: |
legend_size |
Legend text size. |
legend_title |
Optional legend title. |
legend_ncol |
Number of legend columns. |
legend_border |
Swatch border colour. |
legend_bty |
|
Invisibly, a list with counts, proportions,
levels, palette, and groups.
sequence_plot, build_clusters
distribution_plot(as.data.frame(trajectories))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.