View source: R/som.add.circles.R
som.add.circles | R Documentation |
Function to add circles to a SOM plot, with dimension proportional to a selected property
som.add.circles(SOM, P, scale = 1, col.circles = "white")
SOM |
the SOM object |
P |
a vector containing the per-neuron property to plot |
scale |
a number to scale up or down the size of the drawn circles |
col.circles |
the background color of the drawn circles |
Called for its effect.
Stefano Motta stefano.motta@unimib.it
#Read example SOM data
som_model <- readRDS(system.file("extdata", "SOM_HIFa.rds", package = "SOMMD"))
# Compute per neuron population
pop <- neur.population(som_model)
#Plot the som
plot(som_model, type = "count", bgcol=c("red", "blue", "yellow", "green"), shape='straight')
# Add circles to the SOM plot
som.add.circles(som_model, pop, scale=0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.