rachael
Posts:
15
Registered:
2/10/09
|
|
Re: axis size changes when removing tick labels
Posted:
Jan 21, 2013 2:26 PM
|
|
dpb <none@non.net> wrote in message <kcn2rc$e1m$2@speranza.aioe.org>... > 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', []);
hold(axes1,'all'); hold(axes2,'all');
% 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. set(axes1,... 'layer' ,'top',...% Draw axes lines above data 'position',position,... 'xLim' ,xLim,... 'yLim' ,yLim);
set(axes2,... 'layer' ,'top',...% Draw axes lines above data 'position',position + [0.4 0 0 0],... 'xLim' ,xLim,... 'yLim' ,yLim);
|
|