Using the code below, i can set the labels for x and y axis, but can't set the label for color that is
cyl
here. The documentation provides no way around.qplot(mpg, wt, data=mtcars, colour=cyl,xlab="MPG",ylab="WT")
How can I vary the color palette herein
qplot
? So, I wish to do something like in the code below:x <- runif(100) y<-runif(100) time<-runif(100) pal <- colorRampPalette(c('white','black')) cols <- pal(10)[as.numeric(cut(time,breaks = 10))] plot(x,y,pch=19,col = cols)