专栏名称: 阿昆的科研日常
测绘科普,经验分享,科研日常,蜜汁脑洞
目录
相关文章推荐
北京商报  ·  今晚,油价上调!物流卡车或将多花390元,普 ... ·  12 小时前  
北京日报  ·  习近平会见吉尔吉斯斯坦总统扎帕罗夫 ·  18 小时前  
北京商报  ·  张朝阳退回的Labubu,被胡润换了一辆百万 ... ·  2 天前  
51好读  ›  专栏  ›  阿昆的科研日常

“这种局部放大图怎么画?”

阿昆的科研日常  · 公众号  ·  · 2025-04-17 10:55

正文

请到「今天看啥」查看全文


, 301 ); color_hCI1 = TheColor( 'xkcd' , 304 ); color_hCI2 = TheColor( 'xkcd' , 304 ); color_hE = TheColor( 'xkcd' , 587 );
%% 图片尺寸设置(单位:厘米) figureUnits = 'centimeters' ; figureWidth = 15 ; figureHeight = 12 ;
%% 窗口设置 figureHandle = figure; set (gcf, 'Units' , figureUnits, 'Position' , [ 0 0 figureWidth figureHeight]); % define the new figure dimensions hold on
%% 绘制 hFit = line(xfit, yfit); hData = line(xVdata, yVdata); hModel = line(xmodel, ymodel); hCI( 1 ) = line(xmodel, ymodelL); hCI( 2 ) = line(xmodel, ymodelU); hE = errorbar(xdata_m, ydata_m, ydata_s); % 添加label hTitle = title( 'My Publication-Quality Graphics' ); hXLabel = xlabel( 'Length (m)' ); hYLabel = ylabel( 'Mass (kg)' ); % 添加文字注释 hText = text( 10 , 800 , ... sprintf( '{\\itC = %0.1g \\pm %0.1g (CI)}' , c, cint( 2 )-c));
%% 细节优化 % 赋色 set (hFit, 'Color' , color_hFit) set (hModel, 'Color' , color_hModel) set (hCI( 1 ), 'Color' , color_hCI1) set (hCI( 2 ), 'Color' , color_hCI2) set (hData, 'MarkerEdgeColor' , 'none' , 'MarkerFaceColor' , color_hData) set (hE, 'Color' , color_hE, 'MarkerEdgeColor' , [ .2 .2 .2 ], 'MarkerFaceColor' , color_hE) % 设置线属性 set (hFit, 'LineWidth' , 1.5





请到「今天看啥」查看全文