# Help plot with horizontal filling

I want to plot a graph that looks like the following, where the blue curve is $y=x^2$ and the red lines are $y=8x-12$ and $y=-8x+20$. The filling is applied horizontally from the lines to the edge of the graph I tried the following code, but the filling is as desired. Show[Plot[x^2, {x, -1, 4}], Plot[{-8 x + 20, 8 x - 12}, {x, -1, 4}, PlotStyle -> Red, Filling -> Top]] Thank you!

Plot[{x^2, 8 x - 12, -8 x + 20}, {x, -1, 4},
PlotStyle -> {Blue, Red, Red},
Filling -> {2 -> {3}},
AspectRatio -> 1,
PlotRange -> {-10, 10}] The crucial part here is the Filling option. You can of course tweak this further to get what you want.

• Note that MM is filling vertically between curve #2 & curve #3, rather than horizontally to the edges of the graph (which is how the OP had conceived of it.) In this case, these are equivalent, but there might be other cases where you might not be able to perform such a trick. Aug 17 '15 at 14:40
• @MichaelSeifert Can you think of such a case? Aug 17 '15 at 14:42