# Why my region plot looks so weird? [closed]

I'm trying a 2d plot using the following code:

> Zs[z_] := 2 * (1 - CDF[NormalDistribution[0, 1], Abs[z]])

> RegionPlot[{Zs[x] <= 0.1 + (1 - 0.1)*Zs[y] && Zs[y] - Zs[x] <= 0,
Zs[y] <= 0.1 + (1 - 0.1)*Zs[x] && Zs[x] - Zs[y] <= 0}, {x, -5,
5}, {y, -5, 5}, PlotStyle -> Blue,
FrameLabel -> {"\!$$\*SubscriptBox[\(p$$, $$1$$]\)",
"\!$$\*SubscriptBox[\(p$$, $$2$$]\)"}, BoundaryStyle -> None]


I imagine the plot before Enter, it should be a quadratic symmetric region, however, the result is the following region:

You can see the blue region on second and fourth quadrant have some difference with the region in the 1st and 3rd quadrant. I can't understand why this happen.

• Including PlotPoints -> 100 helps.
– JimB
Aug 19, 2022 at 4:41
• Thanks so much! It relieves this problem. Aug 19, 2022 at 4:42
• PlotPoints->100 still missing some parts. Aug 19, 2022 at 7:36

It is recommend to do this by two steps and use ContourPlot and Contours->{0}.

Zs[z_] = 2*(1 - CDF[NormalDistribution[0, 1], Abs[z]]);
plot1 = ContourPlot[
Zs[x] - (0.1 + (1 - 0.1)*Zs[y]), {x, -5, 5}, {y, -5, 5},
Contours -> {0},
RegionFunction -> Function[{x, y}, Zs[y] - Zs[x] <= 0 ],
PlotPoints -> 60, ContourShading -> {Blue, None}];
plot2 = ContourPlot[
Zs[y] - (0.1 + (1 - 0.1)*Zs[x]), {x, -5, 5}, {y, -5, 5},
Contours -> {0},
RegionFunction -> Function[{x, y}, Zs[x] - Zs[y] <= 0 ],
PlotPoints -> 60, ContourShading -> {Blue, None}];
Show[plot1, plot2]