color_biplot_by_discrete {hypergate} | R Documentation |
Colors a biplot according to a vector with discrete values
Description
Colors a biplot according to a vector with discrete values
Usage
color_biplot_by_discrete(
matrix,
discrete_vector,
...,
bty = "l",
pch = 16,
cex = 0.5,
colors = NULL
)
Arguments
matrix |
a two columns matrix |
discrete_vector |
a vector of size nrow(matrix) |
... |
passed to plot |
bty |
passed to plot |
pch |
passed to plot |
cex |
passed to plot |
colors |
Palette to used named after the unique elements of discrete_vector. Generated from rainbow() if missing. |
Examples
data(Samusik_01_subset)
levels=unique(sort(Samusik_01_subset$labels))
colors=setNames(colorRampPalette(palette())(length(levels)),sort(levels))
with(Samusik_01_subset,color_biplot_by_discrete(matrix=tsne,discrete_vector=labels,colors=colors))
[Package hypergate version 0.8.5 Index]