Plot challenge: two bar charts next to next with one indicator line

Simple task:
I would like to place two bar charts in a row and have an indicator horizontal line going above the two bar charts.

What I did:

bar1 = BarChart[{100, 75, 100}, ChartLayout -> “Stacked”,
ChartStyle -> {Blue, Black, Blue}, Frame -> False, Axes -> False,
PlotLabel -> “bar1”];
bar2 = BarChart[{100, 38, 15, 38, 85}, ChartLayout -> “Stacked”,
ChartStyle -> {Blue, Black, White, Black, Blue}, Frame -> False,
Axes -> False, PlotLabel -> “bar2”];
indicator =
Plot[-65 + 100, {x, 0, 4}, PlotStyle -> Red,
PlotLegends -> ToString[65]];

To combine the plots, I tried:

Show[Row[bar1, bar2], indicator]

but the result:

The colors need to be the same.

This is how it should look like in the end:




No, I misunderstood what you wanted. Actually, I don’t know what you want. Is there some example figure out there that you could link to so that we can see what you want?
– march
Aug 4 at 15:25



@march, I hope this helps.
– DoHe
Aug 4 at 15:37



Row requires the objects to be put in a list in the first argument, like in Row[{obj1, obj2, …}]. You miss the curly braces in your code
– glS
Aug 4 at 15:39



Something like Overlay[{GraphicsRow[{bar1, bar2}],indicator}] but I am not sure where exactly you want that line to pass.
– e.doroskevic
Aug 4 at 15:46



@march add answer?
– Feyre
Aug 4 at 16:20


1 Answer


Use Epilog and GraphicsRow. Something like

GraphicsRow[{bar1, bar2},
Spacings -> -20,
Epilog -> {Red, Thickness[0.02], Line[{{0, -180}, {750, -180}}]}

and you can change the coordinates {{0, -180}, {750, -180}} of the Line by trial and error to get what you want (that’s how I usually do it). The result is



Thank you very much !
– DoHe
Aug 4 at 16:29