Hi. I want to convert all negative part of the following plot to zero!
Can you help me please?
Reza,
You can use Max:
ListPlot3D[
Table[Max[
0, -2 Ne[Pi/4] && (\[Alpha]n^2 + \[Alpha]l^2) < 1], {\[Alpha]n, 0,
1, 0.01}, {\[Alpha]l, 0, 1, 0.01}], DataRange -> {{0, 1}, {0, 1}},
PlotRange -> All,
AxesLabel -> {Style["\!\(\*SubscriptBox[\(\[Alpha]\), \(l\)]\)", 10,
Bold, Black],
Style["\!\(\*SubscriptBox[\(\[Alpha]\), \(n\)]\)", 10, Bold,
Black], Style["N", 10, Bold, Black]},
PlotLabel -> "r=\!\(\*FractionBox[\(\[Pi]\), \(4\)]\)"]
Regards,
Neil
Hi Reza
Very strange usage of Do[ ] and Ne[ ], look at Neils post that’s the right way. Keep the definition of Ne[ ] outside of any Do[ ] and Table[ ].
Alternatively to Neils suggestion you could suppress the unwanted plot region by using this Option:
RegionFunction -> Function[{x, y, z}, 0 < z]
Robert