octave-maintainers
[Top][All Lists]
Advanced

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

Re: new subplot bug


From: John W. Eaton
Subject: Re: new subplot bug
Date: Wed, 18 Feb 2009 11:59:32 -0500

On 18-Feb-2009, Ben Abbott wrote:

| I found a few errors in my prior changeset.
| 
|       http://hg.savannah.gnu.org/hgweb/octave/rev/4142982c66c6
| 
| The most severe were not offsetting the outerposition from the postion  
| property, and calculating the lower/bottom inset correctly.
| 
| There are some surprises with the proprietary solution. First, the  
| outerposition properties for subplot with more than 4 rows overlap. In  
| Octave's implementation this results in new subplots deleting  
| neighboring ones.
| 
| I fixed that by trigger deletion when the position properties overlap.
| 
| A second surprise is the interaction of Matlab's parser and the  
| subplot command. See the example below.
| 
|  >> subplot(1,5,1);get(gca,'position')
| ans =     0.13         0.11      0.12374        0.815
| 
|  >> subplot(1,5,1);
|  >> get(gca,'position')
| ans =     0.13         0.11      0.12132        0.815
| 
| I characterized the proprietary behavior using scripts. Thus, it  
| presently respects the first example. I verified the propriety  
| behavior for Matlab 2007b as well as for 2008b. I'd prefer we not try  
| to duplicate this behavior.
| 
| As I already missed several errors, please check this over. If it is  
| ok, please push (I won't be able to until later).

OK, this seems to improve things, so I checked it in.

Now, here is another problem that I have no idea about.  Try running

  x = -10:0.1:10;
  for i = 1:2; subplot (2, 1, i); pause; plot (x, sin(x)); endfor

At the first pause, I see the empty top axes.

At the second pause, both axes are visible and empty.  I would expect
the first one to have a sine wave plot.

After the loop completes, There is a third axes object that overlaps
both subplots and has a single sine wave plot (see the attached image).

Any clues about this one?

Thanks,

jwe


Attachment: foo.pdf
Description: Adobe PDF document


reply via email to

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