i having difficulty trying labels on parcoord() plot. if :
library(mass) data1<-cbind.data.frame("a"=rbind(6,9,10)) data2<-cbind.data.frame("b"=rbind(3,19,1)) parcoord(cbind(data1,data2), col=1, lty=1) axis(2, at=c(6,9,10), labels=c("this","should","bealabel"))
i not labels left hand side of plot. how fix this?
because y-axis
has been rescaled [0,1]
. try axis(2)
see default axis is. therefore, when at = c(6, 9, 10)
, beyond range hence not displayed. here solution:
y <- c(6, 9, 10) pos <- (y - min(y)) / diff(range(y)) ## rescaling parcoord(cbind(data1,data2), col=1, lty=1) axis(2, at=pos, labels=c("this","should","bealabel"))
Comments
Post a Comment