Hi Ron,
I just got bitten by a bug, because I wanted to use grey colors in the presence of na cells and therefore specified a separate na.color. It seems that the na.color argument does not have any effect, at least for types quality and count. The code below demonstrates the problem for type quality. It would be nice if that could be fixed; as the plot functions are quite nested, I am not sure about the source of the problem. It might have to do with plot.kohonen and plot.kohprop having an na.color argument (with default "gray"), while interim functions (such as plot.kohquality) do not always have the explicity argument but accommodate it in the ... only ?
Best, Ulrike
demosom <- kohonen::som(as.matrix(swiss), grid=somgrid(7,6, topo="hexagonal"))## default colors show NA cells in greyplot(demosom, shape="straight", type = "quality")## deviating na color does not workplot(demosom, shape="straight", type = "quality", palette.name = gray.colors, na.color="red")plot(demosom, shape="straight", type = "quality", palette.name = cm.colors, na.color="red")
Hi Ron, I just got bitten by a bug, because I wanted to use grey colors in the presence of na cells and therefore specified a separate
na.color
. It seems that thena.color
argument does not have any effect, at least for typesquality
andcount
. The code below demonstrates the problem for typequality
. It would be nice if that could be fixed; as the plot functions are quite nested, I am not sure about the source of the problem. It might have to do withplot.kohonen
andplot.kohprop
having anna.color
argument (with default"gray"
), while interim functions (such asplot.kohquality
) do not always have the explicity argument but accommodate it in the...
only ? Best, Ulrikedemosom <- kohonen::som(as.matrix(swiss), grid=somgrid(7,6, topo="hexagonal"))
## default colors show NA cells in grey
plot(demosom, shape="straight", type = "quality")
## deviating na color does not work
plot(demosom, shape="straight", type = "quality", palette.name = gray.colors, na.color="red")
plot(demosom, shape="straight", type = "quality", palette.name = cm.colors, na.color="red")