[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: partial plot
From: |
Pascal A. Dupuis |
Subject: |
Re: partial plot |
Date: |
Fri, 19 Mar 2004 14:11:08 -0600 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Fri, Mar 19, 2004 at 10:21:55AM +0100, Miquel Cabanas wrote:
> you are right, I missed the part of the Octave manual (help -i plot)
> where it states that NaN are omitted and Inf are converted to very
> large value before passing them to Gnuplot. Thus, in this case the
> use of find() and is*() functions is not required, nonetheless, they
> can be used to plot values selected according to some other criteria.
>
In the case of NaN, the value is ignored, and lines are interpolated
around the missing point. What I would like is to have the line stop
before the missing value, to emphasize the fact that nothing is available.
Let's illustrate this:
octave> x = (-10:1:9)';data = [x, sin(x), sin(x)];
octave> data(3,2) = NA;
octave> save -ascii data_examp data
octave> gset missing 'NA'
octave> gplot [-11:11] [-1.1:1.1] data with line u 1:2
This produce the strange graph attached.
octave> plot(data(:,1), data(:,2))
generates something still more bogus
>From gnuplot:
gnuplot> set missing 'NA'
gnuplot> plot 'data_examp' using 1:2 w l
missing value is extrapolated
gnuplot> plot 'data_examp' using 1:($2) w l
missing value cause the lines to be discontinuous.
but gplot [-11:11] [-1.1:1.1] data with line u 1:($2) is not accepted
within octave.
In summary:
1) setting something to NaN causes octave to skip the value and
interpolate around it for plot() and gplot()
2) setting something to NA generates strange things, but with
different patterns in plot() and gplot()
3) the extended gplot syntax ($i) is flagged as a syntax error
Is it possible:
1) to track what's going on between octave and gplot subprocess ?
2) to allow gnuplot syntax to contain $ ?
TIA
Pascal Dupuis
--
Dr. ir. Pascal Dupuis
K. U. Leuven, ESAT/ELECTA (formerly ELEN): http://www.esat.kuleuven.ac.be/
Kasteelpark Arenberg, 10; B-3001 Leuven-Heverlee, Belgium
Tel. +32-16-32 10 21 -- Fax +32-16-32 19 85
data_examp.ps
Description: PostScript document