I want to plot several different data sets with the same set of legends but not all data sets have all the legend labels so I want to just plot one legend for all and use the same colors for each legend label.
My data looks something like this
Sample Activity Location Value
brain A1 -99 0.000480219165072995
brain A1 -98 0.000310998665750027
brain A1 -97 0.00013269798404962
brain A1 -96 0.000414032362112828
brain A1 -95 0.000484106264682014
brain A1 -94 0.000277469810522874
brain A1 -93 -0.000312328089983588
brain A1 -92 -0.000326948367221977
brain A1 -91 -0.000566097491837788
brain A2 -99 0.023199362386866
brain A2 -98 0.0232008290610013
brain A2 -97 0.0235067519290527
brain A2 -96 0.0235475873183088
brain A2 -95 0.0237440466425034
brain A2 -94 0.0240249966894288
brain A2 -93 0.0245502842927103
brain A2 -92 0.0244587160446747
brain A2 -91 0.0252699000904297
So I want to plot two lines for Activity, one color for A1 and another color for A2 and etc.
There are about 8 different activities and many locations.
How do I manually set up colors for each Activity? For example, A1 will always be in red, A2 in black, A3 in blue etc..?
ggplot(data=df,aes(x=Location,y=Value,group=Activity))+geom_line(aes(colour=Activity),size=1.5)+theme_bw()