Closed:Maping size and fill to data values through aes (ggplot2)
1
0
Entering edit mode
5.5 years ago

Hi all!

I want to map size and fill to columns of my dataframe but I cant get the fill working. Thanks.

library(ggplot2)
a= data.frame(matrix(rnorm(24),6))
ggplot(a, (aes (X1,X2, size=X3,fill= X4)))+ geom_point()+coord_flip()+scale_fill_gradientn(colours = c('blue', 'red'), values=c(0, 1))
ggplot2 scale_fill_gradientn • 127 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2918 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6