在大的背景下添加相关坐标3 M: o/ _. y4 M( e# {
close all;figure('position',[50 100 1850 900],'color','w')+ }3 j- g# \: S& t
axes('position',[0.055 0.2 0.9 0.7])
! k& A6 x; g t% d7 n1 i3 R; O; aitv=linspace(min(rho_xi_eta( ),max(rho_xi_eta( ),30);
8 C5 \! E- b" ^/ F" k: ]# z) icontourf(xi,eta,rho_xi_eta,itv,'edgecolor','none')0 t& o; s3 Y5 V' y$ [; G% Y/ a# b
hold on;( z |7 w9 A1 A6 X& s4 p
contour(xi,eta,rho_xi_eta,itv,'k-','linewidth',1.5)
6 X5 }: e+ [+ }) Y* o7 ?......
! r8 ?/ c* K2 K" t9 l/ B7 _. |% ?
3 X' a+ E4 e7 U% 添加坐标
; {8 G: v2 i( y$ [9 I# z+ maa=get(gca,'position');! x0 b6 z, q- U5 K4 f, M$ C
h1=axes('position',[0.5 aa(2) 0.05 aa(end)]);
7 R/ h3 p% i! u4 ]$ {set(h1,'color','none') %设置透明背景
7 [. W/ F$ Y" uset(gca,'ycolor','none') %隐藏y轴
! b' ~' R( a3 z7 \/ u4 |set(gca,'xcolor','none') %隐藏x轴# P% H8 L) T4 u
box off;" @- @) F: Z2 y- P" Z" Z
. `( u0 o% A2 v6 L
; t* g8 Y, O$ N V0 I
colorseq=mycolor.color94;/ b" q; c- m3 R7 ]0 W3 b
color_str=colorseq(1:70:end, ;
9 m9 f S5 Z4 c1 v0 R$ D/ Vfor nn=2
. f @! {5 f& q3 ~4 s hold on;
. b2 E8 O8 Y5 u( p) i- U5 ~. Q ii=find(xi(1, ==nn);8 J4 `) b6 i! H2 P! [0 S ?4 o
h1=plot(f_eta(:,ii),eta(:,ii),'color',color_str(nn+1, ,'linewidth',2);
4 J/ y2 v% |" ~+ Cend8 U* ]- c, A& ]. i8 b* f3 H; _/ J
legend('\xi=2')3 c2 t% b! C8 B+ M% y/ c0 }# x; U6 h
* @# D' T" V2 u, r) b3 @7 g2 y& v0 a+ I E" t! z2 b
h=line([0 0],[0 0.9],'color','k');
4 {) x: C. s" j( r4 g! V; ?set(h,'linestyle','--','linewidth',1.5)! ]3 g. C- R& N* {6 b3 `3 {- K5 {% l5 d
set(get(get(h,'Annotation'),'LegendInformation'),'IconDisplayStyle','off'); %设置不显示这条线的legend
/ |9 ]/ N/ W9 \xlim([-1.5 1.5]*1e-8)- s0 V$ N! M, E8 X
set(gca,'xtick',[-10:5:5]*1e-9)
) R3 s* ]" K" W3 i1 h& ?$ F+ M& Oh1=line([-10 5]*1e-9,[delta delta],'color','k');
( [. g' u) ]! f0 Vset(h1,'linestyle','--','linewidth',1.5); B5 }- f3 G0 ?% @% y$ W$ x
set(get(get(h1,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');& y: S! V/ l: K$ [7 {
ylim([0 1])
$ w, ^$ x' Y7 A1 g" Q$ b7 d4 }# {& `6 l) e% x
' Y* X( A0 \3 L" B3 e
9 l" i8 b0 I; b. Z. ^! }2 l) C4 e: ?. d( G8 x( c! C# [% j
转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |