Bug introduced in 11.0 and fixed in 11.1

I have some code to plot a parametric function:

H1 = 4;
F = Function[x, If[x != 0, (1 - Tanh[H1 x]/(H1 x))/x^2, 25/3]];
x = Function[{r, t}, (1-r + 3 F[1-r] t) (F[1-r]/F[1-r + 3 F[1-r] t])^(-1/3)];
ParametricPlot[Evaluate[Table[{x[r, y], y}, {r, Range[-4, 0, .5]}]], {y, 0, 10}]

enter image description here

It clearly works and evaluates the plots just fine, in the entire range {y, 0, 10}, however when I try for more values, these first lines suddenly get chopped off:

ParametricPlot[Evaluate[Table[{x[r, y], y}, {r, Range[-4, 4, .5]}]], {y, 0, 10}]

enter image description here

Evaluating x manually works just fine, so I don't understand the problem. Curiously, making the parameter H1 larger makes the problem worse. I can Show plots that I generate separately for different ranges of r, but that seems incredibly silly. Mathematica doesn't give me any errors!? What is going on?

  • $\begingroup$ Your code works fine for me. All I can think of is that you have some old definitions kicking around. Have you tried clearing everything or restarting the kernel? $\endgroup$ – aardvark2012 Aug 2 '17 at 10:41
  • $\begingroup$ Your code works in version 11.1. What version are you using? $\endgroup$ – Hugh Aug 2 '17 at 10:43
  • $\begingroup$ @aardvark2012, yep, tried :( $\endgroup$ – bjorne Aug 2 '17 at 10:43
  • $\begingroup$ @Hugh, I'm using 11.0. Uggh, another plotting bug $\endgroup$ – bjorne Aug 2 '17 at 10:44
  • $\begingroup$ I happen to still have version 11.0 and this replicates your problem. So a bug fixed in version 11.1. Not sure how to record this as a bug. $\endgroup$ – Hugh Aug 2 '17 at 10:46

The problem is with the use of Evaluate, if you just remove it then it works fine, you just need to compromise on having a single color plot.

ParametricPlot[Table[{x[r, y], y}, {r, Range[-4, 4, .5]}], {y, 0, 10}]

enter image description here

|improve this answer|||||
  • 1
    $\begingroup$ Interesting, thanks $\endgroup$ – bjorne Aug 2 '17 at 16:45

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.