# "Automatic is not a valid StreamPoints specification"

If I run

StreamPlot[{a, b}, {a, 0, 10}, {b, 0, a}]


the kernel hangs, and I have to restart it. I also get the error message

StreamPlot::strmpts: Automatic is not a valid StreamPoints specification.

If I try to manually specify StreamPoints, the kernel still hangs, and the error message changes: e.g., with StreamPoints -> 10, I get

StreamPlot::strmpts: 10 is not a valid StreamPoints specification.

(For the record, I'm using 10.4.1 for Microsoft Windows (64-bit)).

What's going on here? What does this message mean, and how can I fix it?

• same issue in v9 (windows 10/64bit)
– kglr
Aug 4 '19 at 13:41
• Same error with v12 (macOS 10.14.6) Aug 4 '19 at 17:08

No idea why it doesn't work as in Plot3D[ a b , {a, 0, 10}, {b, 0, a}]...

Try RegionFunction

StreamPlot[{a, b}, {a, 0, 10}, {b, 0, 10},RegionFunction -> Function[{a, b}, b < a]]


• Thanks! Which version are you using? Mine is 10.4. Can you confirm that the same error happens for v>10.4? Aug 4 '19 at 13:38
• The same error in v11.01! Aug 4 '19 at 13:40

StreamPlot is not designed to work with such domain specs. It ought to give a better message though. Actually it doesn't seem to validate the domain before sending it to the internal routines. (Probably, it used a standard plot validation, but the internal routines assume the limits are numeric, i.e., that it's a rectangle.)

tr = Trace[
StreamPlot[{a, b}, {a, 0, 10}, {b, 0, a}],
_VisualizationVectorFieldsVectorFieldsDumpStreamPointsParse,
TraceInternal -> True];


StreamPlot::strmpts: Automatic is not a valid StreamPoints specification.

Cases[
Flatten@tr,
HoldForm[parse_VisualizationVectorFieldsVectorFieldsDumpStreamPointsParse] :>
parse]


StreamPlot::strmpts: Automatic is not a valid StreamPoints specification.

(*  {None}  *)


One can inspect StreamPointsParse and its subroutines with GeneralUtilitiesPrintDefinitions`, if one's curious. It's fairly short code and easy to follow.