I'm sure this is an easy one, but I dont know why this code cannot plot two graphs in the same window.
nfil=5
ncol=5
set.seed(850)
som <- trainSOM(x.data=datasom[3:8],
dimension=c(nfil,ncol),
nb.save = 100,
verbose=TRUE)
# SUPERCLUSTERS
num.grupos=4
som.sc <- superClass(som, k=num.grupos)
### PLOTEO SOM
par(mfrow=c(1,2))
plot(som.sc, plot.var=FALSE)
# observaciones de cada neurona
counts<-as.vector(som.sc$som$clustering)
kounts<-c(0)
for (i in 1:(nfil*ncol)) {
kounts[i]=0
}
for (i in 1:(length(counts))) {
kounts[counts[i]]=kounts[counts[i]]+1
}
plot(som.sc, type="grid",names=kounts)
As far I read in google, with the par(mfrow=c(1,2))
line should be fine, but it doesn't work. I ran the code and the first plot used the first half of the window, as it should be. But, the second plot use the entire window. Please, help me!. Thanks.
P.S.: The review of this post didn't allow me to write the entire code. I'm using the SOMbrero package.
question from:
https://stackoverflow.com/questions/65893735/how-can-i-do-a-multiple-plot-with-a-somsc-type-graph 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…