Plot not robust with respect to Inf values

John W. Eaton jwe at bevo.che.wisc.edu
Thu Aug 21 14:30:49 CDT 2008


On 21-Aug-2008, John W. Eaton wrote:

| On  6-Aug-2008, gOS wrote:
| 
| | 
| | 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.
| 
| Please try the following change.
| 
| jwe

Sorry, that was the wrong changeset file.  The correct one is
attached below.

jwe

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080821/e2ef0b78/attachment.ksh 


More information about the Bug-octave mailing list