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: axis size changes when removing tick labels
Replies: 6   Last Post: Jan 22, 2013 4:23 PM

Advanced Search

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

Posts: 16
Registered: 2/10/09
axis size changes when removing tick labels
Posted: Jan 9, 2013 2:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Is there a simple way to fix the axis size so that it stays the same size w/ or w/o tick labels?

Currently, when I set my 'yticklabel' to [], my axes2 become larger. I would like it to stay the same size w/ or w/o labels.

I'm running matlab R2012b ( on OSX Mountain Lion.

Code is below

fig = figure;
set(fig, 'color','w');
hndl = axes('Position',[0 0 1 1], 'Visible','off','color','w');

axes1 = axes(...
'OuterPosition', [0.1 0.1 0.3 0.7], ...
'Parent', fig, ...
'fontsize', 12);

axes2 = axes(...
'OuterPosition', [0.5, 0.1 0.3 0.7],...
'Parent', fig, ...
'fontsize', 12, ...
'yticklabel', []);


% plot bathymetry
pcolor(axes1, xl, yl, h_l);
pcolor(axes2, xw,yw,h_w);
shading(axes1, 'flat');
shading(axes2, 'flat');

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.