Plotting future uncertainty on line graph with ggplot in R

192 Views Asked by At

I am looking for a way in ggplot to plot an historic line of data which then merges into a shaded area representing future uncertainty (like the GHG emissions graphs below - but at the moment I just want one trajectory into the future - and even then based simply on straight lines).

This is the historic data line I want:

Quarter historicData

1: 2022Q3 1.91626

2: 2022Q2 1.78145

3: 2022Q1 1.66113

4: 2021Q4 1.47459

I then want to have a "wedge" going from a single point of 1.91626 at 2022Q3, spreading to a maximum of 47 and a minimum of 37 at 2029Q4

I have looked at geom_ribbon but this appears only to do a constant width?

Could anyone help me please? Many thanks, Tim

Future uncertainty bounds

0

There are 0 best solutions below