I have a multivalued curve p1 (left curve) and a normal curve xpr2 (right), and I want to fill the middle region between them as blue, and the rightmost region as red.
However, I get this extra filled part above my multivalued function, presumably because the xpr2 curve is above that part. Is there a way to get the plot to ignore filling beyond a certain point?
xpr1[y_] := 5.077959119860908` - 15.96152127464673` y^(1/3) + 11.632042032912723` Sqrt[y];
xpr2[x_] := 2.4673477623994344` - 1.8055789567179195` x + 0.5471986643936791` x^2 - 0.055509819604498495` x^3;
p1[y_] := {xpr1[y], y};
Plot[{xpr2[x], p1[y][[2]] /. NSolve[p1[y][[1]] == x]}, {x, 0, 2},
PlotRange -> {{0, 2}, {0.2, 1.2}},
Filling -> {1 -> {{2}, {Red, Blue}}}]
Result:
And this is what I want it to look like:
Plot
is filling until it reaches the second plot. The filling meets the second plot outside of the plot range. You may have to useParametricPlot
or something like that. $\endgroup$