24小时热门版块排行榜    

CyRhmU.jpeg
查看: 10916  |  回复: 1

梦懵1

银虫 (小有名气)

[求助] matlab subplot子图调整位置后,坐标轴label发生了重叠,该怎么办?已有1人参与

matlab subplot子图调整位置后,坐标轴label发生了重叠,该怎么办?
matlab画图代码:
% function []=RSEFig14_else()
warning off;
  format long;
  Name=strcat('RSEFig14_else');
  left=500;
  bottom=150;
  width=600;
  height=800;
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % sardir='F:\RSECODE2017\RSECODE2017\data1zhangxi\rs2imageszhangxi\';
newdir='F:\RSECODE2017\RSECODE2017\data1zhangxi\rs2imageszhangxi\RSEfig12_15_results\';
f12dir='F:\RSECODE2017\RSECODE2017\data1zhangxi\rs2imageszhangxi\plotfig12_15\';
ptm='nwflagD';
sear=strcat(f12dir,'*',ptm,'*');
   tem=ls(sear);
   si=size(tem);
   NN=si(1);
% % % % % % % % % % % % % % % % % % % % % % % % % %
ptm1='gdLatmatrix_wholeimage';
sear1=strcat(newdir,'*',ptm1,'*');
   tem1=ls(sear1);
   
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% testRSE;
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

h=figure('Name',Name); set(gcf,'color','w');  %
set(h,'Position',[left bottom width height]);
pos=[0.09 0.71 0.36 0.275;
    0.6 0.71 0.36 0.275;
    0.09 0.39 0.36 0.275;
    0.6 0.39 0.36 0.275;
    0.09 0.07 0.36 0.275;
    0.6 0.07 0.36 0.275];
for i=1:1%NN
    i
    pterm=tem(i,;
    pterm1=tem1(i,;
    w=strcat(f12dir,pterm);
    nwflag=dlmread(w);
    w=strcat(newdir,pterm1);
    w0=strrep(w,ptm,'gdLatmatrix_wholeimage');
    gdLat=dlmread(w0);
    w0=strrep(w,ptm,'gdLongmatrix_wholeimage');
    gdLon=dlmread(w0);   

    hh=subplot('Position',pos(i,);
    latmin0=min(min(gdLat));
    latmax0=max(max(gdLat));
    longmin0=min(min(gdLon));
    longmax0=max(max(gdLon));
   
    m_proj('lambert','lat',[latmin0 latmax0],'lon',[longmin0 longmax0],'aspect');%,'position',[0.1 0.1 0.9 0.9 ]);%
    hold on;
    m_coast('patch',[1 .85 .7]);%%,'edgecolor','r');
    m_pcolor(gdLon,gdLat,nwflag);hold on;colormap('gray');%caxis([-30,0]);
    shading flat;
    hold on;
    hb=colorbar('fontsize',8,'FontName','Arial');
    set(get(hb,'ylabel'),'string','','fontsize',8,'FontName','Arial');
    m_grid( 'box','fancy','tickdir','in','Yaxislocation','left','FontName','Arial',...
       'Xaxislocation','bottom','ylabeldir','end','ticklength',.02,'linest','none','fontsize',8);%);
    xlabel('Longitude ( ^° )','fontsize',8);
    ylabel('Latitude ( ^° )','fontsize',8,'rotation',90);
end
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

chendequan

铁虫 (小有名气)

【答案】应助回帖

感谢参与,应助指数 +1
改变ylabel离坐标轴的距离
QQ:516477448,真心帮助解决MATLAB相关问题,提供详细资料,Word文档明确具体问题及要求,尽力而为!
2楼2017-12-07 15:58:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 梦懵1 的主题更新
信息提示
请填处理意见