I'm working on my research project and I want to add something to my ggplot. I have concentration-time graphs and I want to point out at what point a dose is given. I need to point this out with a triangle just above the graph so that the reader knows at what point a dose is given. An example of what I mean is added underneath.
The data is sensitive, so I can't give you that, but the idea is simple. It's concentration-time data. My code for the actual graph is:
ggplot(data = df, aes(x = "Time", y = "Concentration", col = "Species"))
+ ylab("Concentration (mg/mL)") + xlab ("Time (h)")
+ geom_point() + scale_color_viridis(discrete = T, option = "F", begin = 0, end = 0.8)
+ theme_bw() + scale_y_log10()
I know that there is an annotation() function, but I don't think there's an option for adding triangles to the graph. I haven't tried anything else yet, because I don't know what other options there are. I hope someone can help me with this problem.