Quantcast
Channel: Active questions tagged units - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 41

StreamPlot "Part is not a Graphics primitive or directive."

$
0
0

I am trying to use StreamPlot with units. Here is a minimal example to produce the error "Part is not a Graphics primitive or directive." :

g[x_] := UnitSimplify[UnitConvert[x Quantity["Seconds"]]/Quantity["Seconds"]]StreamPlot[{x, g[x]}, {x, 0, 1}, {y, 0, 1}]

With this change it works:

g[x_] := UnitSimplify[x UnitConvert[Quantity["Seconds"]]/Quantity["Seconds"]]StreamPlot[{x, g[x]}, {x, 0, 1}, {y, 0, 1}]

Why does this happen?


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>