With
f[x_] := 1 - x^2
g[x_] := 1 - 0.5 x^2
You can use Epilog
to add the thick line:
RegionPlot[{y < f[x], f[x] < y < g[x], y > g[x]}, {x, 0, 2}, {y, 0, 2},
PlotPoints -> 50,
Epilog -> (Plot[g[x], {x, 0, 2}, PlotStyle -> {Black, Thick}][[1]]),
PlotStyle -> {Directive[Yellow, Opacity[0.4]],
Directive[Pink, Opacity[0.4]],
Directive[Green, Opacity[0.4]]}]
or a combination of MeshFunctions
, MeshStyle
and Mesh
with a small value (somehow 0.
does not work):
RegionPlot[{y < f[x], f[x] < y < g[x], y > g[x]}, {x, 0, 2}, {y, 0, 2},
PlotPoints -> 50,
Mesh -> {{0.00001}}, MeshFunctions -> {Abs[#2 - g[#1]] &},
MeshStyle -> Thick,
PlotStyle -> {Directive[Yellow, Opacity[0.4]],
Directive[Pink, Opacity[0.4]],
Directive[Green, Opacity[0.4]]}]
or Show
to show the region plot with a second plot containing the thick line:
Show[RegionPlot[{y < f[x], f[x] < y < g[x], y > g[x]}, {x, 0, 2}, {y, 0, 2},
PlotPoints -> 50,
PlotStyle -> {Directive[Yellow, Opacity[0.4]],
Directive[Pink, Opacity[0.4]],
Directive[Green, Opacity[0.4]]}],
Plot[g[x], {x, 0, 2}, PlotStyle -> {Black, Thick}]]
to get

ContourPlot
but you can do the same withRegionPlot
. $\endgroup$