I'm trying to accomplish something that I used to do in Excel, I have several timeseries for the same time interval and would like to plot them as lines (easy enough using ggplot geom_line), but one of them should be plotted as an area plot.
Basically something like this:
Plase note that the series S_1 is plotted as area.
I have already tried adding geom_area() with aes values equal to the value of the area series:
ggplot(df.lines, aes(x=Index, y=Value, colour=Series)) + geom_line() + geom_area(aes(x=df.area$Index, y=df.area$S_1))
How could I acomplish something like this using ggplot2?
geom_area(data = df.area, aes(x=Index, y=S_1))
. Also what have you tried, and what was the result? – Mike H.Series
object not found. – pablete