[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new subplot bug
From: |
Ben Abbott |
Subject: |
Re: new subplot bug |
Date: |
Wed, 18 Feb 2009 13:50:30 -0500 |
On Wednesday, February 18, 2009, at 12:15PM, "Ben Abbott" <address@hidden>
wrote:
>On Wednesday, February 18, 2009, at 11:59AM, "John W. Eaton" <address@hidden>
>wrote:
>>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.
>
>At the second pause, I see the sin in the first.
>
>>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).
>
>I don't see the third axes. After the last pause, I get the expected result.
>
>>Any clues about this one?
>>
>>Thanks,
>>
>>jwe
>
>I haven't built since yesterday.
>
>I'll do so now and see if I can duplicate what you see.
>
>Ben
>
oh-oh ... now I see the same problem.
octave:1> x = 0:0.01:10;
octave:2> for i = 1:2; subplot (2, 1, i); pause; plot (x, sin(x)); endfor
octave:3> findobj (gcf, "type", "axes")
ans =
-11.9012
-6.8679
-1.0786
octave:4> h = findobj (gcf, "type", "axes");
octave:5> get (h, "tag")
ans =
{
[1,1] =
[1,2] = gnuplot_drawnow
[1,3] =
}
octave:6> get (h, "visible")
ans =
{
[1,1] = on
[1,2] = on
[1,3] = on
}
hmmm, This is quite strange.
clf; for i = 1:2; subplot (2, 1, i); disp(numel(findobj (gcf, "type",
"axes"))); plot (x, sin(x)); endfor
1
2
clf; for i = 1:2; subplot (2, 1, i); pause; disp(numel(findobj (gcf, "type",
"axes"))); plot (x, sin(x)); endfor
2
3
The "pause" appears to result in all "visible" properties being set to "on"
Ben
- Re: new subplot bug,
Ben Abbott <=
- Re: new subplot bug, John W. Eaton, 2009/02/18
- Re: new subplot bug, Ben Abbott, 2009/02/18
- Re: new subplot bug, John W. Eaton, 2009/02/18
- Re: new subplot bug, Ben Abbott, 2009/02/18
- Re: new subplot bug, John W. Eaton, 2009/02/18
- Re: new subplot bug, Ben Abbott, 2009/02/19
- Re: repositioning of gnuplot figures (was: new subplot bug), Ben Abbott, 2009/02/20