JerryYe的个人博客分享 http://blog.sciencenet.cn/u/JerryYe

博文

【MATLAB】嵌套坐标的相关设置

已有 2294 次阅读 2018-4-18 15:21 |个人分类:Matlab|系统分类:科研笔记| 嵌套坐标, matlab

 在大的背景下添加相关坐标

close all;figure('position',[50 100 1850 900],'color','w')

axes('position',[0.055 0.2 0.9 0.7])

itv=linspace(min(rho_xi_eta(:)),max(rho_xi_eta(:)),30);

contourf(xi,eta,rho_xi_eta,itv,'edgecolor','none')

hold on;

contour(xi,eta,rho_xi_eta,itv,'k-','linewidth',1.5)

......


% 添加坐标

aa=get(gca,'position');

h1=axes('position',[0.5 aa(2) 0.05 aa(end)]);

set(h1,'color','none')    %设置透明背景

set(gca,'ycolor','none') %隐藏y轴

set(gca,'xcolor','none') %隐藏x轴

box off;


colorseq=mycolor.color94;

color_str=colorseq(1:70:end,:);

for nn=2

    hold on;

    ii=find(xi(1,:)==nn);

    h1=plot(f_eta(:,ii),eta(:,ii),'color',color_str(nn+1,:),'linewidth',2);

end

legend('\xi=2')


h=line([0 0],[0 0.9],'color','k');

set(h,'linestyle','--','linewidth',1.5)

set(get(get(h,'Annotation'),'LegendInformation'),'IconDisplayStyle','off'); %设置不显示这条线的legend

xlim([-1.5 1.5]*1e-8)

set(gca,'xtick',[-10:5:5]*1e-9)

h1=line([-10 5]*1e-9,[delta delta],'color','k');

set(h1,'linestyle','--','linewidth',1.5)

set(get(get(h1,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');

ylim([0 1])

pic_rho_f_eta_1e_3.png



https://blog.sciencenet.cn/blog-2824237-1109619.html

上一篇:【MATLAB】fopen和eval结合应用实例
下一篇:【Endnote】引用文献杂志名称的缩写问题
收藏 IP: 219.146.245.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-19 16:34

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部