I’m doing some parametric 3D plots, and want the line color to change with a parameter (e.g., time). So… suppose we have 3 states in an ODE, with solution vectors u1
, u2
, u3
that depend on a parameter (time) vector t
. Suppose I do:
plot(u1,u2,u3,linecolor=cgrad([:blue,:red]),line_z=t)
This will normally produce a beautiful 3D line plot where the color changes from blue to red during the evolution of t
.
In my case, it produced a greyish, boring color that was constant with t
.
After some debugging, I found that the reason was that the datatype of the elements in u1
, etc. was Any
. When I mapped the datatype to Float64
, everything worked as it should.
Question: is this a bug, or an intended behavior? All other plotting commands I have tested, work fine even with datatype Any
.
[The results were not produced with DifferentialEquations
, which – of course – produce results of numeric type.]