2016-06-17 30 views
1

はコードです: enter image description hereこの状況でgeom_pointの色を変更するにはどうすればよいですか?ここ

しかし、私はこのように、ブルースへのポイントの色を変更する必要があります: enter image description here

どのようにすることができます。ここ

df$ProsperRating..Alpha.<-ordered(df$ProsperRating..Alpha., 
            levels = c("AA","A","B","C","D","E","HR")) 
ggplot(aes(x=BorrowerAPR,y=LP_InterestandFees), 
     data=subset(df,!is.na(ProsperRating..Alpha.)))+ 
    geom_point(alpha=0.2,aes(color=ProsperRating..Alpha.),position = "jitter") 

が生じたプロットであります私はそれを達成する?

+0

を生成します。 – eipi10

答えて

3
library(ggplot2) 

qplot(x, price, data = diamonds, colour = clarity) + 
    scale_colour_brewer(palette="Blues", direction = -1) 

`scale_color_manual`または` scale_color_discrete`を参照してください。この

enter image description here

関連する問題