I have seen that on matlab there is the cmd recessionplot that adds bar of recessions to plots. But that is for the official US dates, do you know if there is a similar command for the european crisis as certified by cepr?

  • $\begingroup$ Could you show an example of this plot? Do you mean this command? $\endgroup$ – Bob Jansen Oct 26 '16 at 20:58
  • $\begingroup$ yes exactly the cmd is simply recessionplot $\endgroup$ – Klapaucius Oct 26 '16 at 21:19
  • $\begingroup$ Vandalizing questions isn’t allowed. $\endgroup$ – Bob Jansen Oct 31 '17 at 5:17

You need to do it manually. Here's an example of shading an area behind a plot. You just need to adapt the colors and the dates for the recession.

A very basic example about shading an area in a plot. Shading an area bounded by a curve might be of interest as well.

ha = area([4 6], [10 10]);
hold on
plot(1:10, 1:10,'r')
axis([1 10 1 10])
hold off

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.