Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to plot a simple graph using Plot3D:

Plot3D[0.25*(1/(1 - 0.9* (1 - bn))) ((1 - bn)/(1 - 0.5* bn))^2, {bn, 0, 1}, {bu, 0, 1}, 
  RegionFunction -> Function[{bn, bu}, bn > bu]]

Which gives the output:

enter image description here

Why is there a triangle where Plot3D keeps the function flat while it is clearly increasing. Here is the graph without limit on the region:

enter image description here

I also tried different approaches. For instance:

Plot3D[0.25*(1/(1 - 0.9* (1 - bn))) ((1 - bn)/(1 - 0.5* bn))^2*If[bn > bu, 1, 0], 
  {bn, 0,1}, {bu, 0, 1}]

with even worst outcome:

enter image description here

Many thanks for your help.

share|improve this question
    
ClippingStyle -> None will remove the "triangle" and the answer below overcomes the problem. –  Mike Honeychurch Oct 22 '13 at 23:38
add comment

1 Answer

When Mathematica automatically determines the plot range, it sometimes decides to clip off the very high or very low parts of the graph. It does this, I suppose, when including the extreme parts of the range results in a plot that is flattened too much. If you don't want this, Mathematica also supplies easy options to override the automatic behavior.

Try PlotRange -> All:

Plot3D[0.25*(1/(1 - 0.9*(1 - bn))) ((1 - bn)/(1 - 0.5*bn))^2,
 {bn, 0, 1}, {bu, 0, 1}, RegionFunction -> Function[{bn, bu}, bn > bu], 
 PlotRange -> All]

Mathematica graphics

Only a small part of the graph above sticks up high. With the setting PlotRange -> Automatic, Mathematica decides to chop part of it off. Without the restriction by RegionFunction, as in the OP's second plot, the high part runs along the whole bu axis. In that case, Mathematica doesn't cut it off. If it were steeper it would cut it off:

Plot3D[0.25*(1/(1 - 0.95*(1 - bn))) ((1 - bn)/(1 - 0.5*bn))^2,
 {bn, 0,1}, {bu, 0, 1}]

Mathematica graphics

share|improve this answer
    
Thank you! Any idea what the problem is with the other methods? –  mathtd Oct 23 '13 at 1:59
    
@mathtd See edit. I think that's what you were asking about. I don't know what the exact algorithm is for clipping. –  Michael E2 Oct 23 '13 at 4:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.