Overlaying vertical bands on a line plot

jbortfeld

Board Regular
Joined
Feb 24, 2005
Messages
67
Hi,

I'm trying to graph an economic data series (line plot) and want to overlay shaded bands that will indicate recession periods. So in the first column I have the dates, the second column is my data series and the third column is a series of binary numbers where 0 indicates no recession and 1 indicates a recession.

Is there a good way to overlay the recession bands on the data plot. I've used the line/column on two axes option but it's not the greatest.

Thanks.
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Jon Peltier

MrExcel MVP
Joined
May 14, 2003
Messages
4,922
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
You could do something similar to the line column, but I'd start from scratch:

Make your chart with two line series. Select the series comprised of 0/1, and on the chart menu, select chart type, and choose the 100% stacked column type (top right sub type option). Double click the column series, pick a light gray fill and no border on the Patterns tab, on the Options tab, change the gap width to 0, and on the Axis tab, choose Secondary. Double click the secondary Y axis (right of chart), change the scale to min=0 and max=1 and make sure the min and max auto boxes are unchecked; on the patterns tab choose none for line, tick marks, and tick labels.
 

Watch MrExcel Video

Forum statistics

Threads
1,112,883
Messages
5,543,019
Members
410,583
Latest member
gazz57
Top