24小时热门版块排行榜    

查看: 11113  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 2026国自然函评费到账 +16 羊腰板 2026-08-21 17/850 2026-08-23 23:02 by tianxiaochun
[基金申请] 让我中一个面上吧! +12 大萍1987 2026-08-20 15/750 2026-08-23 20:44 by 大萍1987
[基金申请] 2026年的国家社科基金项目通讯评审的新规则与新动向、新挑战 +4 process2012 2026-08-23 5/250 2026-08-23 19:58 by jurkat.1640
[教师之家] 跳槽后在研项目怎么办? +5 简单化xn 2026-08-22 10/500 2026-08-23 12:38 by 简单化xn
[基金申请] 什么时候开奖? +9 CrisMessi 2026-08-18 10/500 2026-08-23 12:03 by 丶昵称占用
[基金申请] 今天放榜吗? +15 布布和一二 2026-08-19 16/800 2026-08-23 09:55 by 张春生
[基金申请] 只有每年这种时候来逛逛小木虫 +24 yaoyewhu2008 2026-08-20 26/1300 2026-08-22 17:43 by kammury
[基金申请] 人气不行了 +8 fansofjerry 2026-08-21 8/400 2026-08-22 16:30 by zyqchem
[基金申请] 时间戳今天,20号变了 +5 archvillain 2026-08-20 5/250 2026-08-22 06:12 by hui_daxiao
[基金申请] 放榜前的不淡定 40+4 snowwithsea 2026-08-19 14/700 2026-08-21 23:51 by cratir
[基金申请] 建议基金发布提前给出明确的时间点 +10 kulium 2026-08-21 13/650 2026-08-21 21:58 by alongwaytogo
[基金申请] 看来今天不会放榜了? +8 chengyan1220 2026-08-21 11/550 2026-08-21 17:52 by dcqxinyang
[基金申请] 感觉是下周放榜了 +7 angus9576 2026-08-17 12/600 2026-08-21 13:38 by weiyin
[基金申请] 我面上完蛋了 +7 且听虎啸 2026-08-20 8/400 2026-08-21 12:31 by 酷酷墨镜
[基金申请] 应该是下周三26日公布了吧? +4 哈哈蛤? 2026-08-21 4/200 2026-08-21 10:58 by Vivilian
[基金申请] 今天放榜没戏了吧 +9 yuleib84 2026-08-19 11/550 2026-08-21 10:06 by gltch
[基金申请] 时间戳变了,能看出什么问题? +18 基诺咪客 2026-08-17 23/1150 2026-08-20 17:19 by Godzela
[基金申请] 重要消息,中午系统在维护 +11 yuleib84 2026-08-18 12/600 2026-08-20 11:09 by xskun
[基金申请] 朋友圈看到的 +6 wangzilk 2026-08-18 8/400 2026-08-19 10:55 by Haru815
[基金申请] 明天放榜? +5 Shxjjxjkx 2026-08-18 5/250 2026-08-18 18:14 by -大大大大大-
信息提示
请填处理意见