F[u_, v_] = {(1 + u v)/(u + v), (u - v)/(u + v), (1 - u v)/(u + v)};
gr1 = ParametricPlot3D[F[u, v], {u, 0, 2.}, {v, 0, 2.}]
gr2 = ParametricPlot3D[F[u - v, u + v], {u, 0, 1}, {v, 0, 1}]
Show[{gr1, gr2}, PlotRange -> All]

Suspect that it may be due to calculation of infinite range.

  • 1
    $\begingroup$ You're sort of right. gr2 has a vastly greater PlotRange than gr1. The surface that mathematica gives for gr1 lies within about 3 units from the origin. The surface for gr2 has an extent of about 10^7. gr1 is but a speck on gr2. To see this pass the Axes->True option to all three plots. $\endgroup$ – LLlAMnYP Mar 16 '15 at 10:25
  • $\begingroup$ Oh, also the surfaces of gr1 and gr2 match exactly (no surprise there, as you are basically using the same function to draw both of them). try defining gr1 with the option PlotStyle->Red for example, then use Show[{gr1,gr2}] without the option PlotRange->All and you'll see the red and blue surfaces on top of each other. $\endgroup$ – LLlAMnYP Mar 16 '15 at 10:46
lst = {#, PlotRange@#2} & @@@
   {{"gr1", gr1}, {"gr2", gr2},
    {"Show[gr1,gr2]", Show[gr1, gr2]},
    {"Show[gr1,gr2, PlotRange -> All]",Show[gr1, gr2, PlotRange -> All]}};
Grid[lst, Dividers -> All]

enter image description here

whereas the ranges that cover the plot ranges of gr1 and gr2:

Transpose[Through@{Min @@@ # &, Max @@@ # &}@Thread[PlotRange /@ {gr1, gr2}]]
(* {{0., 3.78083}, {-6.98504, 1.}, {-0.75, 8.47028}} *)

A work-around is to use an explicit setting for PlotRange computed from the plot ranges of gr1 and gr2.

Show[gr1, gr2, ImageSize -> 400,
 PlotRange -> Transpose[Through@{Min@@@#&, Max@@@#&}@ Thread[PlotRange /@ {gr1, gr2}]]]

enter image description here

|improve this answer|||||
  • $\begingroup$ Your code is not generating the same outputs on my machine. gr2 consistently gives those crazy 10^7 ranges, which suggests to me, that everything is working as intended. $\endgroup$ – LLlAMnYP Mar 16 '15 at 13:23
  • $\begingroup$ @LLlAMnYP, may well be version/os dependent (I am using version windows 8 x64). $\endgroup$ – kglr Mar 16 '15 at 13:26
  • $\begingroup$ Sorry for misleading, a restart of the kernel made my output the same as yours. I'd note that your custom PlotRange specification is not (and should not be) the same as PlotRange->All. It gives the union of the ranges of gr1 and gr2, while setting it to All extends the plot to include the entire parametric surface which is not entirely shown in gr2 by default. $\endgroup$ – LLlAMnYP Mar 16 '15 at 13:33
  • $\begingroup$ We cannot tailor the Ranges manually ourselves ( as user) . There should be specific statement from Documentation when PlotRange-> All is useful and when it is not useful. $\endgroup$ – Narasimham Mar 16 '15 at 17:18
  • $\begingroup$ @LLlAMnYP, good point. I also agree with you that PlotRange->All is working as advertised. $\endgroup$ – kglr Mar 16 '15 at 17:33

If I remember correctly, you cannot include plot parameters into Show, so try:

Show[gr1, gr2]
|improve this answer|||||
  • $\begingroup$ You absolutely can include plot parameters in show, it's an extremely useful feature. $\endgroup$ – LLlAMnYP Mar 16 '15 at 10:40
  • $\begingroup$ Was this always possible? Because I often have problems with this, and include it in one of the plots I want to show. Also, in the problem stated here, it seems to work in the way I suggested. So it is unclear to me why what the problem is. $\endgroup$ – Mockup Dungeon Mar 16 '15 at 11:08
  • 1
    $\begingroup$ I don't know the history of the development of Show, but the code in OP also throws no error. By default, Show uses the parameters of the first graphics object passed to it, but these parameters can be overridden by options passed to Show itself. Therefore if you use just Show[gr1,gr2] you get the plot with the PlotRange of gr1, which, as I commented to the question, is much smaller, than the range of gr2, so you see both surfaces. When OP uses PlotRange->All, it expands to include gr2 which is vastly bigger. $\endgroup$ – LLlAMnYP Mar 16 '15 at 11:37
  • $\begingroup$ OK, thanks for the clarification, I'll check this out. $\endgroup$ – Mockup Dungeon Mar 16 '15 at 12:15
  • $\begingroup$ Plot parameters must be carried forward to Show, else the Show has no charm..I mean a full utility.I use ver 8. Neither gr1 nor gr2 has big Range but there is something hidden in PlotRange->All that includes widest Range. $\endgroup$ – Narasimham Mar 16 '15 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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