octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot changes affects octave


From: Quentin Spencer
Subject: Re: gnuplot changes affects octave
Date: Wed, 23 Aug 2006 14:35:16 -0500
User-agent: Thunderbird 1.5.0.5 (X11/20060808)

John W. Eaton wrote:
On 22-Aug-2006, Dmitri A. Sergatskov wrote:

| With data file that looks like that:
| | address@hidden octave]$ cat a.dat
| 1 2
| 2 4
| nan nan
| 3 6
| 4 8
| | With gnuplot 4.0
| plot "a.dat" w line
| plot "a.dat" using 1:2 w line
| plot "a.dat" using ($1):($2) w line
| | all produce the same plot -- line with a break between x=2 and x=3 | | In gnuplot 4.1 it changed: | | plot "a.day" w line
|       gives an error message:
| gnuplot> plot "a.dat" w line
|               ^
|          Bad data on line 3
| | plot "a.dat" using 1:2 w line
|        plots a line w/o a break
| | plot "a.dat" using ($1):($2) w line
|       plots a line w/ a break (the same as gnuplot 4.0)
| | So I would think the easiest change would be to get octave
| issue "pl 'file' using ($1):($2) w line" ...

OK, then how about the following change (relative to the current CVS,
so it assumes the previous patch has been applied as well)?  It
eliminates the strip_nan_and_inf argument completely, allows the
gnuplot plotter to accept ($1):($2) style using clauses, and fixes the
plotting functions to emit them.  The only problem I see with this is
that now we don't convert Inf to a large but finite value, so gnuplot
will simply omit any points that include Inf.  Is that a problem worth
fixing?  If so, then I will have to reinstate some kind of option
here so that Inf is clipped when writing the data, or have the plot
functions clip the data to be plotted (not as ugly, but would force a
copy of the data if it contains Inf values).

I vote for not fixing this, since this is what Matlab does (not plotting Inf values) and I always thought it looked better. Plotting a very large number for Inf means you usually have to mess with the axes after plotting so you can see the rest of your data.

Quentin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]