I have the following df
df_pr_curve <- data.frame(
Recall = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1,
0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1),
Test = c("real", "real", "real", "real", "real", "real", "real", "real", "real", "real", "real",
"synthetic", "synthetic", "synthetic", "synthetic", "synthetic", "synthetic", "synthetic", "synthetic", "synthetic", "synthetic", "synthetic"
),
Precision = c(0.9615, 0.4498, 0.4498, 0.4157, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0.999, 0.997, 0
)
)
My current problem is that when I run the following code, the area of "real" is in the background. I want this area to be in the foreground because I want to compare the two areas with each other.
plot <- ggplot(df_pr_curve, mapping = aes(x=Recall,y=Precision,fill = Test))+
geom_area(position="identity", stat="identity",alpha=.5)
Can you show me how I can change it? Many thanks and best regards!