View source: R/fct_colored_Dots.R
colored_dots | R Documentation |
colored_dots I submitted this and it was pulled into dendextend but is left here for less dependency/more control
colored_dots( colors, dend, rowLabels = NULL, cex.rowLabels = 0.9, add = TRUE, y_scale, y_shift, text_shift = 1, sort_by_labels_order = TRUE, horiz = FALSE, circ = FALSE, dot_size = 1, ... )
colors |
Coloring of the dots beside the dendrogram. Either a vector (one color per object) or a matrix (can also be an array or a data frame) with each column giving one group with color per object. Each column will be plotted as a colored point (when horiz = FALSE) under the dendrogram. As long as the sort_by_labels_order paramter is TRUE (default), the colors vector/matrix should be provided in the order of the original data order (and it will be re-ordered automatically to the order of the dendrogram) |
dend |
a dendrogram object. If missing, the colors are plotted without and re-ordering (this assumes that the colors are already ordered based on the dend's labels) This is also important in order to get the correct height/location of the colored dots (i.e.: adjusting the y_scale and y_shift) |
rowLabels |
Labels for the colorings given in |
cex.rowLabels |
Font size scale factor for the row labels. See |
add |
logical(TRUE), should the colored dots be added to an existing dendrogram plot? |
y_scale |
how much should the dots be stretched on the y axis? If no dend is supplied - the default will be 1 |
y_shift |
where should the dots be plotted underneath the x axis? By default it will try to locate the dots underneath the labels (it may miss, in which case you would need to enter a number manually) If no dend is supplied - the default will be 0 |
text_shift |
a dendrogram object |
sort_by_labels_order |
logical(TRUE) - if TRUE (default), then the order of the colored dots will be sorted based on the order needed to change the original order of the observations to the current order of the labels in the dendrogram. If FALSE the colored dots are plotted as-is, based on the order of the colors vector. |
horiz |
logical (FALSE by default). Set to TRUE when using plot(dend, horiz = TRUE) |
circ |
circularize, T/F |
dot_size |
dot_size |
... |
ignored at this point. |
NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.