# A difference between results in RegionPlot and 3DPlot

I have a problem with limitation in a 3DPlot. In the following, you can see some constraints where should be satisfied for eta and mu. By RegionPlot, one can see an area that is not the same as the area appears in the 3DPlot in z=0. Is it a meaningful expectation?!

-0.1 + 2420.57 (0.000504756 \[Eta] - 0.0000756665 \[Mu])<0

-3.27589 + \[Mu]<0

0.000504756 \[Eta] - 0.0000756665 \[Mu]>0

0.0551428 \[Eta] + 0.0101754 \[Mu]>0

Abs[(-56.5585 \[Eta]^2 Sqrt[\[Mu]] -
7.66021 \[Eta]^(3/2) Sqrt[33.354 \[Eta] - 5. \[Mu]] Sqrt[\[Mu]] -
52.0236 \[Eta] \[Mu]^(3/2) + 1.33815 \[Mu]^(5/2) +
1. \[Eta] Sqrt[27.0963 \[Eta] + 5. \[Mu]])/(\[Eta] Sqrt[
27.0963 \[Eta] + 5. \[Mu]])] < 1


The range of each parameter is:

{\[Mu], 0, 0.113}, {\[Eta], 0, 0.09}


The original code to generate the first figure is:

RegionPlot[{ -0.1 + 2420.57 (0.000504756 \[Eta] - 0.0000756665 \[Mu])<0 &&
-3.27589 + \[Mu]<0 && 0.000504756 \[Eta] - 0.0000756665 \[Mu]>0 && 0.0551428
\[Eta] + 0.0101754 \[Mu]>0 &&
Abs[(-56.5585 \[Eta]^2 Sqrt[\[Mu]] -
7.66021 \[Eta]^(3/2) Sqrt[33.354 \[Eta] - 5. \[Mu]] Sqrt[\[Mu]] -
52.0236 \[Eta] \[Mu]^(3/2) + 1.33815 \[Mu]^(5/2) +
1. \[Eta] Sqrt[27.0963 \[Eta] + 5. \[Mu]])/(\[Eta] Sqrt[
27.0963 \[Eta] + 5. \[Mu]])] < 1}, {\[Mu], 0, 0.113}, {\[Eta], 0, 0.09},
BoundaryStyle -> {Green}, PlotStyle -> {None},
FrameLabel -> Automatic]


and the second:

Plot3D[0, {\[Mu], 0, 0.113}, {\[Eta], 0, 0.09},
PlotLegends -> {0, "PNTC", "NTC"}, AxesLabel -> Automatic,
RegionFunction ->
Function[{\[Eta], \[Mu]},
-0.1 + 2420.57 (0.000504756
\[Eta] - 0.0000756665 \[Mu])<0 &&
-3.27589 + \[Mu]<0 && 0.000504756 \[Eta] - 0.0000756665 \[Mu]>0 && 0.0551428
\[Eta] + 0.0101754 \[Mu]>0 &&
Abs[(-56.5585 \[Eta]^2 Sqrt[\[Mu]] -
7.66021 \[Eta]^(3/2) Sqrt[33.354 \[Eta] - 5. \[Mu]] Sqrt[\[Mu]] -
52.0236 \[Eta] \[Mu]^(3/2) + 1.33815 \[Mu]^(5/2) +
1. \[Eta] Sqrt[27.0963 \[Eta] + 5. \[Mu]])/(\[Eta] Sqrt[
27.0963 \[Eta] + 5. \[Mu]])] < 1], PlotStyle -> Red]


• please show the full code used to generate those figures. There is no 3DPlot so its not obvious what that means.. Mar 9, 2018 at 17:13
• You need to switch the arg order in the region function: Function[{\[Mu], \[Eta]} Mar 9, 2018 at 17:43
• I this questions somehow related to your earlier post? If yes, you should merge them maybe (e.g. delete one of them).
– gwr
Mar 9, 2018 at 19:38
• Maybe. But I think there is also another useful thing here Mar 9, 2018 at 19:59

for sake of closing this out here's what you get with the correct ordering of the region function arguments.

Plot3D[0, {\[Mu], 0, 0.113}, {\[Eta], 0, 0.09},
PlotLegends -> {0, "PNTC", "NTC"}, AxesLabel -> Automatic,
RegionFunction ->
Function[{\[Mu], \[Eta]}, -0.1 +
2420.57 (0.000504756 \[Eta] - 0.0000756665 \[Mu]) <
0 && -3.27589 + \[Mu] < 0 &&
0.000504756 \[Eta] - 0.0000756665 \[Mu] > 0 &&
0.0551428 \[Eta] + 0.0101754 \[Mu] > 0 &&
Abs[(-56.5585 \[Eta]^2 Sqrt[\[Mu]] -
7.66021 \[Eta]^(3/2) Sqrt[
33.354 \[Eta] - 5. \[Mu]] Sqrt[\[Mu]] -
52.0236 \[Eta] \[Mu]^(3/2) + 1.33815 \[Mu]^(5/2) +
1. \[Eta] Sqrt[27.0963 \[Eta] + 5. \[Mu]])/(\[Eta] Sqrt[
27.0963 \[Eta] + 5. \[Mu]])] < 1], PlotStyle -> Red]


note that Function doesn't know or care that you used the same symbol names \[Eta], \[Mu] for the Plot3D iterators, so by transposing you transpose the region.