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
Re: axis size changes when removing tick labels
Posted: Jan 21, 2013 2:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <> wrote in message <kcn2rc$e1m$>...
> On 1/10/2013 10:48 AM, rachael wrote:
> > I'm going to file a bug report.
> Please don't toppost--hard conversation follow makes...
> Have you checked renderer settings, etc., that it may be a fignewton of
> the particular graphics drivers, hardward display card, etc., etc., ...?
> --

Okay, Yoda, I won't "toppost" this time. :-)

I suppose I hadn't considered fignewtons in my graphics drivers or hardware. You may be onto something to detect a delectable, yet erroneous, "treat" in my system but the "renderer" alone doesn't appear to do the trick.

Here is the work around that was offered by a Mathworks tech. with whom I troubleshot the issue:

fig = figure;
set(fig, 'color','w');
hndl = axes('Position',[0 0 1 1], 'Visible','off','color','w');
ax = [0,800,1800,3000];
position = [0.1 0.1 0.3 0.7]; % of axes1.
xLim = [0,800];
yLim = [1800,3000];

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, ws.y, ws.x , ws.h);
pcolor(axes2, ws.y,ws.x , ws.h);
shading(axes1, 'flat');
shading(axes2, 'flat');

axis([axes1, axes2], 'equal');

%% NOTE: setting the 'xlim' and 'ylim' here is what really seems to do the fix. The %% code I had used before was along the lines of "axis([axes1, axes2], ax)", but this %% code (now) produces uneven yaxes. Specifyin the xlim and ylim independently %% seems to be the ticket.
'layer' ,'top',...% Draw axes lines above data
'xLim' ,xLim,...
'yLim' ,yLim);

'layer' ,'top',...% Draw axes lines above data
'position',position + [0.4 0 0 0],...
'xLim' ,xLim,...
'yLim' ,yLim);

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.