The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: One strange thing when I use subplot, did I do anything wrong? or is it a bug?
Replies: 5   Last Post: Aug 18, 2014 1:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jingquan

Posts: 2
Registered: 2/16/10
Re: One strange thing when I use subplot, did I do anything wrong? or
Posted: Feb 17, 2010 11:27 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I got a fix by setting the units property of the axes:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure
subplot(2,1,2)
set(gca,'units','points'); %without this setting, the axes will shrink
imagesc(rand(100))
while 1
subplot(2,1,2)
colorbar
title('NOW Click Enter, the axes will NOT shrink')
pause
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Thanks for the responds!


Jingquan




Nathan <ngreco32@gmail.com> wrote in message <aec17d5f-26a5-4e24-a1f9-4eafb1920ed0@s36g2000prh.googlegroups.com>...
> On Feb 16, 4:47 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> > I'm using R2008b on this computer, and no such shrinking occurs.
>
> Using r2009b AND r2009a and the shrinking DOES occur. If you take out
> the colorbar OR the title from within the loop, the shrinking no
> longer occurs. The problem occurs when BOTH of them are present,
> apparently.
>
> Using r2007b, the shrinking does NOT occur, however you can tell that
> the error bar does change size by a pixel or two from time to time.
>
> Sorry, I could not find any fix for this. I noticed this problem
> before with a FEX submission, but assumed it was just me...
>
> -Nathan




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.