I am pretty new to mathematica (very new) and am trying to make a plot to display regions of a function that are positive and negative subject to a constraint.
I have a function $P = P(n,m)$ that has positive and negative values in regions of an $(n,m)$ plot. However the function is only valid for some constraint $\sigma=\sigma(n,m)$.
I have tried to do this in two ways but neither really highlights the boundary of where the function takes positive and negative values. The first way is using
ContourPlot[P, {n, 0, 5}, {m, 0, 5}, PlotLegends -> Automatic, FrameLabel -> Automatic, PlotRange -> All, Contours -> 100, RegionFunction -> Function[{n, m}, sigma > 0], ColorFunction -> "GreenPinkTones"]
but doing it this way results in the following which does not really highlight the boundary between positive and negative.
The second way I have tried is to use RegionPlot
as follows
RegionPlot[{P > 0, P < 0}, {n, 0, 10}, {m, 0, 10}, BoundaryStyle -> {Dashed, Dashed}, PlotStyle -> {Red, Blue}]
In this case though I am not sure how to apply the $\sigma$ constraint of where the plot is valid. It ends up looking like
I think I would probably prefer the contour plot version if I could force the contour colouring to be distinct and normalised around zero but either (or both) methods would be awesome.
Any help here would be much appreciated!!
edit*1
$P$ looks like
uzhat
and$\sigma$
in your equation. $\endgroup$