I am trying to figure out how to create this complex ggplot using the dataset below:
The plot will be like this:
For each "type", there will be a curve, a set of 4 points, and a set of 4 segments.
- Each curve will be a curve of the the function [exp(ax + bx^2)], where a and b are in the dataset. I think it can be achieved by:
geom_function(fun = function(x) exp(a*x + b*x^2))
- The points can be plotted from the variable "points" like this:
geom_point(aes(x = d, y = points))
- The segments can be plotted from the start and end variables like this:
geom_segment(aes(x = d, y = start, xend = d, yend = end))
- The y axis is in a log10 scale, which can be achieved by adding:
I think I know the individual details, but unfortunately I am not being able to plot it after I put everything together. The curves of the functions are not coming up, and I am getting errors. Can anyone please help?
Thank you so much!!!!