I have a dataset that has a three columns: a year, a minimum value, and a maximum value. I want to plot a line between the min and max value for each year.
This plot shows a geom_point plot with the min and max values from each year but I do not know how to connect the two values with a line since they come from different columns.
Here is the code for the ggplot:
#plot year (y) and max and min points (x)
ggplot(phen2, aes(y=Year)) +
geom_point(aes(x = max, color = "max")) +
geom_point(aes(x = min, color = "min"))