som.add.circles: Add circles to SOM

View source: R/som.add.circles.R

som.add.circlesR Documentation

Add circles to SOM

Description

Function to add circles to a SOM plot, with dimension proportional to a selected property

Usage

som.add.circles(SOM, P, scale = 1, col.circles = "white")

Arguments

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

Value

Called for its effect.

Author(s)

Stefano Motta stefano.motta@unimib.it

Examples

#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)


SOMMD documentation built on Oct. 2, 2024, 5:07 p.m.