1 2 3 4 5 6 7 8 9 10 11 12
| p1<-ggplot(data=df,aes(carat,price))+ geom_point(aes(colour=cut))+ scale_colour_manual(values = 2:6) p2<-ggplot(data=df,aes(carat,price))+ geom_point(aes(colour=cut))+ scale_colour_manual(values = 2:6,label=c('Good'='G' , 'Fair'='F','Very Good'='V','Premium'='P','Ideal'='I'),limits=c('Good','Very Good','Fair','Premium','Ideal')) p3<-ggplot(data=df,aes(carat,price))+ geom_point(aes(colour=table))+ scale_color_gradient(low='green',high='red') p4<-ggplot(data=df,aes(carat,price))+ geom_point(aes(colour=table))+ scale_color_gradient(low='green',high='red',limits=c(50,100),breaks=seq(50,100,25),labels=c('test1','test2','test3'))
|