octave-maintainers
[Top][All Lists]
Advanced

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

Re: automated (or otherwise) tests for graphics code?


From: John W. Eaton
Subject: Re: automated (or otherwise) tests for graphics code?
Date: Fri, 17 Oct 2008 14:31:01 -0400

On 17-Oct-2008, John W. Eaton wrote:

| On 17-Oct-2008, David Bateman wrote:
| 
| | David Bateman wrote:
| | > John W. Eaton wrote:
| | >> We seem to be having a lot of regressions in the graphics code
| | >> lately, so maybe it is time to start thinking of some way to provide
| | >> tests for these functions.  
| | >
| | > Hey progress is making a different mistake -)
| | 
| | I applied the attached patch that fixes a few more of the plotting problems
| 
| Thanks.
| 
| With your patch, I currently see these remaining demo failures
| 
| [...]

OK, I see that some of these demos work when run by themselves in a
fresh Octave session, but they fail when run sequentially in the same
session.

This failure:

| /home/jwe/src/octave/scripts/plot/plotyy.m example 1:
|    x = 0:0.1:2*pi; 
|    y1 = sin (x);
|    y2 = exp (x - 1);
|    ax = plotyy (x, y1, x - 1, y2, @plot, @semilogy);
|    xlabel ("X");
|    ylabel (ax(1), "Axis 1");
|    ylabel (ax(2), "Axis 2");
| 
|   /home/jwe/src/octave/scripts/plot/plotyy.m example 1: failed
|   axes: expecting argument to be a scalar axes handle

Seems to cause a series of other problems.  I can duplicate the
problem above with something as simple as:

  octave:1> plotyy ([0,1], [0,1], [1,2], [1,2], @plot, @plot);
  octave:2> plotyy ([0,1], [0,1], [1,2], [1,2], @plot, @plot);
  Stopped in:

  --> plotyy>deleteplotyy at line 188 column 5
      newplot at line 49 column 2
      plotyy>__plotyy__ at line 130 column 3
      plotyy at line 102 column 19
  tmp = -1.2364
  error: axes: expecting argument to be a scalar axes handle
  error: called from:
  error:   /home/jwe/src/octave/scripts/plot/axes.m at line 56, column 7
  error:   /home/jwe/src/octave/scripts/plot/plotyy.m at line 138, column 3
  error:   /home/jwe/src/octave/scripts/plot/plotyy.m at line 104, column 5

In the above, I've inserted a call to dbstack at in the
"plotyy>deleteplotyy" function.  The problem seems to be that the
deletefcn callback is called and deletes an axes object when it should
not.  Is newplot doing the right thing?  Should some function be
clearing the deletefcn callback?  I don't understand how all of these
functions are intended to work, so I could use some help with fixing
this problem.

Thanks,

jwe


reply via email to

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