Hey guys,
I'm totally new to R but I have to get into it prior to my master thesis. I hope you can help me with a problem so I can finally move on.
I'm trying to create a XY-Plot for porpoise surfacings. I'm gonna use X and Y coordinates for the axes and want to set the porpoise individuals/numbers as legend. So each identified porpoise should have its own color so that we can see all the surfacing coordinates for one porpoise as blue dots for porpoise 1 e.g. and all coordinates for porpoise 2 as yellow squares etc.
This is the code I got right now:
ggplot(example_data, aes(x = XNorth, y = YEast, color = as.factor("Porposise Number"))) + geom_point(size = 3, shape = 18) + labs(y= "East coordinate", x = "North coordinate", color = "Porpoise Number") + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
I tried using a code I created before for a different research. Right now my plot looks like this:
How do I edit my code to show me the different porpoises (3 in this case)? I though it'd work when setting the Porpoise Number as factor. Worked before on my previous plot.
Thanks for any help,
Kingpin