I'm very new to R and I'm trying to build a scatter plot that codes my data according to shape, colour and fill.I want 5 different colours, 3 different shapes, and these to be either filled or not filled (in an non filled point, I would still want the shape and the colour). My data looks basically like this:
blank.test <- read.table(header=T, text="Colour Shape Fill X13C X15N
1 B B A 16 10
2 D A A 16 12
3 E A B 17 14
4 C A A 14 18
5 A A B 13 18
6 C B B 18 13
7 E C B 10 12
8 E A B 11 10
9 A C B 14 13
10 B A A 11 14
11 C B A 11 10
12 E B A 11 19
13 A B A 10 18
14 A C B 17 16
15 E B A 16 13
16 A C A 16 14")
If I do this:
ggplot(blank.test, aes(x=X13C, y=X15N,size=5)) +
geom_point(aes(shape=Shape,fill=Fill,color=Colour))
I get no filled or unfilled data points
I did a little a little research and it looked like the problem was with the symbols themselves, which cannot take different settings for line and fill; it was recommended I used shapes pch between 21 and 25
But if I do this:
ggplot(blank.test, aes(x=X13C, y=X15N,color=(Colour), shape=(Shape),fill=(Fill),size=5)) +
geom_point() + scale_shape_manual(values=c(21,22,25))`
I still don't get what I want
I also tried playing around with scale_fill_manual
without any good result.