I have data.frame with 72 discrete categories. When I color these categories, I get 72 different keys in the legend. I would prefer to use only every second or third key.
Any idea how I reduce the number of lines in a legend?
Thanks N.
The code that reproduces my problem is below.
t=seq(0,2*pi,length.out=10) RR=rep(cos(t),72)+0.1*rnorm(720) dim(RR)=c(10,72) stuff=data.frame(alt,RR) names(stuff)=c("altitude", paste(rep(15:20,each=12), rep(c("00","05",as.character(seq(from=10,to=55,by=5))),6), sep=":")) bb=melt(stuff,id.vars=c(1)) names(bb)[2:3]=c("period","velocity") ggplot(data=bb,aes(altitude,velocity))+geom_point(aes(color=period))+geom_smooth()
source share