Plot not robust with respect to Inf values

gOS bkirklin at quantapoint.com
Wed Aug 6 12:16:21 CDT 2008


Attempting to pass Inf or NaN to plot results in interestingly different
results, and there's a bug somewhere in it.

plot(NaN,NaN) results in
error: plot: expecting first argument to be asex handle ... etc

plot(Inf,Inf) results in
line 15: undefined variable: Inf

gnuplot> plot "-" using ($1):($2) axes x1y1 title "" with lines ...

I'd assume that there is some sort of failure on all graphics packages. As
Inf and NaN can appear in matrices, shouldn't plot be able to identify when
its passed data it shouldn't be passed?

I view this as a bug. Matlab simply returns a blank plot while not crashing,
if this isn't possible in Octave for each back end it probably needs to be
handled.

Even getting an error from Octave instead of gnuplot would be good enough
for me, currently operations procede if Inf is present so there is no way to
catch on the issue besides checking every value in the matrix before
plotting.
-- 
View this message in context: http://www.nabble.com/Plot-not-robust-with-respect-to-Inf-values-tp18855812p18855812.html
Sent from the Octave - Bugs mailing list archive at Nabble.com.



More information about the Bug-octave mailing list