Color Gradients With ggplot

后端 未结 1 487
甜味超标
甜味超标 2021-01-04 13:25

I have some geographic x,y,z data which I plot as follows

p<-ggplot(aes(x=x,y=y,fill=z),data=my_data)

I then apply a gradient

         


        
1条回答
  •  盖世英雄少女心
    2021-01-04 13:48

    There are two versions of these scale functions, one for colour and one for fill. You just needed to use the fill versions, i.e. scale_fill_hue, etc.

    0 讨论(0)
提交回复
热议问题