I used the parallel array trellis packet method to build data and ran into the problem of generating a legend. I created a vector of custom colors for the plot, but I could not find a way to convey them in order to override the default colors specified in the legend. Although I did not have enough time and ended up correcting the colors of the legends in Photoshop, I would like to know the correct way to do this in the grid.
Here is the code that generated the chart with a 4-column legend:
parallelplot(acc, horizontal.axis=FALSE, col=acc_colors, lwd=1.5, cex=2.5, ylab="Accuracy (Min = 50%, Max = 100%)", xlab="Activity (overall = average across activities)", main="Human Activity Recognition Accuracy", scales=list(cex=1), auto.key=list(text=c("Test Set", "Test Subject", "Training Set", "Training Subject"), title=" ", space="top", columns=4, points=FALSE) )
Any ideas on how to convey custom legend colors?
source share