From bff21e507e8b98a205517f2068f28a073dbaab22 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Apr 2018 16:44:55 -0400 Subject: bugfix for plotting --- R/plot.gensvm.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'R') 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)) -- cgit v1.2.3