Module[{f, t, range},
 f[x_?NumericQ] := 2*x;
 range = {t, 0, 1};
 Plot[f[t], range]

In version 11.1, the above runs just fine, but in version 10.1, I see

Plot::pllim: Range specification range$195 is not of the form {x, xmin, xmax}

If I change range to Evaluate[range], the code works in version 10.1

What changed between versions to alter the behavior of this code? Plot has attribute HoldAll in both versions, so that doesn't explain it. I ask because I want to learn how to better anticipate differences between versions because I use a cluster with version 10.1 but have more recent versions on my laptop. I didn't see anything in the documentation for Plot that would have helped me anticipate this.

  • 1
    $\begingroup$ fyi, same behaviour in version 10.4.1. This was the last version in 10. So this changed happened in 11 version. With the Mathematica source code being closed, only someone from WRI can look and see what changed :) It might be a change in Evaluated changing from False to True by default? just a guess. $\endgroup$
    – Nasser
    Mar 2, 2018 at 5:12
  • 1
    $\begingroup$ @Nasser Thanks for checking 10.4.1. As I'm newer to MMA, I often wonder if there is something well-known among the more experienced that I'm missing, but if no one here happens to mention the answer soon, I'll check with WRI. $\endgroup$ Mar 2, 2018 at 7:21


Browse other questions tagged or ask your own question.