Say this is my dataset:
> ( fake = data.frame( id=as.character(18:22), x=rnorm(5), y=rnorm(5) ) )
id x y
1 18 1.93800377 0.67515777
2 19 1.28241814 -0.04164806
3 20 -1.58919444 -0.50885536
4 21 -0.08127943 -1.90003188
5 22 0.78134213 0.17693039
I want a scatterplot of x vs. y in which the plotting shape is the id variable. I tried this:
ggplot( data=fake, aes( x=x, y=y, shape=id) ) + geom_point() +
scale_shape_manual(values=as.character(fake$id)) + theme_bw()

It appears that only the first character of id is being used as a plotting shape. How can I use the entire string?
