compute eigenvalues numerically



Probably you can circumvent the error by delay evaluation of allroots.
Here are some ideas. I didn't try any of these.
(1) defined a function FOO(d) := realpart(etc etc);
then plot2d(FOO, [d, ...]) (i.e. not FOO(d) which evaluates FOO right away)
(2) plot2d('(realpart(...)), [d, ...]) (quote plot2d's argument)
(3) plot2d(lambda([d], realpart(...)), [d, ...])

Hope this helps,

Robert Dodier