plotyy doesn't produce expected result

John W. Eaton jwe at octave.org
Thu Jan 15 16:44:18 CST 2009


On 23-Oct-2008, Brian Mong wrote:

| To: bug at octave.org
| Cc: bungernut at gmail.com
| Subject: plotyy dosent produce expected results
| --------
| Bug report for Octave 3.0.2 configured for i686-pc-linux-gnu
| 
| Description:
| -----------
| 
| Follow the example in plotyy help doc:
| octave:7> clear all
| octave:8> x = 0:0.1:2*pi;
| octave:9> y1 = sin (x);
| octave:10> y2 = exp (x - 1);
| octave:11> ax = plotyy (x, y1, x - 1, y2);
| error: invalid matrix index = 2
| error: evaluating assignment expression near line 83, column 10
| error: evaluating if command near line 75, column 5
| error: evaluating if command near line 59, column 3
| error: called from `plotyy' in file
| `/usr/share/octave/3.0.2/m/plot/plotyy.m'
| error: evaluating assignment expression near line 11, column 4
| 
| Repeat-By:
| ---------
| 
|   * Please replace this item with a description of the sequence of
|     events that causes the problem to occur.
| 
| Fix:
| ---
| 
| Odly the example on the matlab site works
| octave:1> x = 0:0.01:20;
| octave:2> y1 = 200*exp(-0.05*x).*sin(x);
| octave:3> y2 = 0.8*exp(-0.5*x).*sin(10*x);
| octave:4> [AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
| 
| Unfortunatly plotyy does not work for the plot I want to do. I get the
| exact same error messages as the canned example in the help doc.

I can't reproduce this problem with a copy of Octave built from the
current development sources, so I think the problem has been fixed for
the upcoming 3.2 release.  I doubt that a simple fix is possible for
the 3.0.x series.

jwe


More information about the Bug-octave mailing list