diff options
Diffstat (limited to 'R/plot.gensvm.R')
| -rw-r--r-- | R/plot.gensvm.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/plot.gensvm.R b/R/plot.gensvm.R index 3f6f5d2..e05a690 100644 --- a/R/plot.gensvm.R +++ b/R/plot.gensvm.R @@ -129,8 +129,9 @@ plot.gensvm <- function(x, labels, newdata=NULL, with.margins=TRUE, colors <- gensvm.plot.colors(fit$n.classes) markers <- gensvm.plot.markers(fit$n.classes) - col.vector <- colors[labels] - mark.vector <- markers[labels] + indices <- match(labels, classes) + col.vector <- colors[indices] + mark.vector <- markers[indices] if (fit$n.classes == 2) S <- cbind(S, matrix(0, nrow(S), 1)) |
