i'm newbie and i really need some help with my data. First of all, i can't change the legend to show the shape of points. And secondly i need to show just 2 out of 3 categorial variables (just 2 and 3, not 1).
alikvot <- data_oliga$alikvot
#selecting categorial variables
alikvot = sample(c("1", "2", "3"), 648, replace = TRUE)
alikvot = as.factor(alikvot)
alikvot = cbind(data_oliga, alikvot)
#creating scatterplot
Graf_oliga = ggplot(data = data_oliga, aes (x = konc_v, y = Area,
colour = factor(alikvot), shape = alikvot, group = alikvot))
Graf_oliga +
geom_point() +
theme(axis.text.x = element_blank(),
axis.ticks.x = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank()) +
scale_shape_identity() +
xlab("Abs * 400") +
labs(colour = "Alikvot", shape = alikvot) +
scale_x_log10(breaks = trans_breaks("log10", function(x) 10^x)) +
scale_y_log10(breaks = trans_breaks("log10", function(x) 10^x))
I know that the code is so messed up. Thanks for any help
Data looks like that:
ID oliga | alikvot | Area | Abs * 400 |
---|---|---|---|
39/18 | 1 | 1234 | 56789 |
39/18 | 1 | 3465 | 56789 |
39/18 | 2 | 1456 | 56789 |
39/18 | 2 | 3546 | 23187 |
39/18 | 3 | 11681 | 78624 |
39/18 | 3 | 1681 | 12357 |
50/18 | 1 | 45654 | 23394 |
50/18 | 1 | 1156 | 14653 |
50/18 | 2 | 5467 | 42358 |
50/18 | 2 | 9241 | 32186 |
50/18 | 3 | 7864 | 32168 |
50/18 | 3 | 6821 | 48918 |