Manually adding recession bars with Matlab

Hi professor,

I know after correctly specifying time axis in matlab plot, it is easy to add recession bar by the code “rececession plot;” . However, the recession plot here is by default generated by the NBER data ( US data), I want to customize the recession bar based on the UK data, say, of which the rececessions cover the period 1990Q3-1991Q3, and 2008Q2-2009Q2, how I am supposed to do so?

Best

Hi Julie,

I suggest you try this general implementation.
You can easily adapt it to your purpose :slightly_smiling_face:.
Recessions.zip (2.3 KB)

1 Like