在大的背景下添加相关坐标
. z H. L3 ~ G- h+ Z; [close all;figure('position',[50 100 1850 900],'color','w')5 r9 w9 ^. G3 H; y, U7 S) |4 D: R, T
axes('position',[0.055 0.2 0.9 0.7])
0 _" z/ c: e1 B( O) vitv=linspace(min(rho_xi_eta( ),max(rho_xi_eta( ),30);
/ j% R7 M+ D h* ncontourf(xi,eta,rho_xi_eta,itv,'edgecolor','none')
! x R1 ^) [6 S. lhold on;( B: ^4 ?/ g/ I) i% ~* W
contour(xi,eta,rho_xi_eta,itv,'k-','linewidth',1.5)
' |6 l F) Y* G- r6 n: j b......
$ U, ~/ y5 o/ ?, P1 V ?3 L% r0 F; \* H, s6 I6 B2 S2 T* c
+ e/ Y* x% L0 y# G% 添加坐标
( `3 P6 {+ U- S4 `" l% X) oaa=get(gca,'position');: C: i7 A' q# Q0 h' c8 N
h1=axes('position',[0.5 aa(2) 0.05 aa(end)]);/ k2 c+ v# L7 _5 s- X% w
set(h1,'color','none') %设置透明背景0 |' l; x, U6 b1 p" \# d. P( e
set(gca,'ycolor','none') %隐藏y轴
X ^" I) T8 G0 T& @% Oset(gca,'xcolor','none') %隐藏x轴
$ v! E/ i) C3 K$ z( i* obox off;. a+ N! {. F" j- @- k5 {$ ~! V: W _
3 @4 x+ F$ k' X7 [$ V# W* ^$ `1 K( L) l: u
colorseq=mycolor.color94;: x: u3 m/ i7 z# H, e
color_str=colorseq(1:70:end, ;
: C8 p0 U) `3 e9 Kfor nn=2/ d* G* _ c7 U8 K' t. m
hold on;
+ c u+ w' W* N+ [, ^+ k. S ii=find(xi(1, ==nn);2 z2 l, t3 ^- |. i5 l6 A
h1=plot(f_eta(:,ii),eta(:,ii),'color',color_str(nn+1, ,'linewidth',2);0 q$ V9 }6 g4 U! b. c- a3 u+ }
end
% @( a! y( ?4 e* y5 a8 d6 ylegend('\xi=2')
9 |7 e% g* |2 I* ]6 t3 P* `1 ]6 Q
( b- h6 Q/ |* I- z& C4 e1 \; Xh=line([0 0],[0 0.9],'color','k');
) F7 K' ^7 R2 Q# aset(h,'linestyle','--','linewidth',1.5)
- [/ t( v1 k2 T% Vset(get(get(h,'Annotation'),'LegendInformation'),'IconDisplayStyle','off'); %设置不显示这条线的legend' u% a# K+ s# Z" J, k
xlim([-1.5 1.5]*1e-8)
+ c, }. w/ O0 S' [set(gca,'xtick',[-10:5:5]*1e-9)
/ o# p0 ?' g7 G8 U _+ W" dh1=line([-10 5]*1e-9,[delta delta],'color','k');
6 ^' F; Y3 C5 B( aset(h1,'linestyle','--','linewidth',1.5)
4 {" U& Q5 L- B* Y" f+ K' Iset(get(get(h1,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');9 Z% ]* {# U( Q! h/ [- m. p7 |
ylim([0 1])) H. R/ G. r* o( M B
2 @& c. S) z! k" ]5 D: E( I5 O; l( u" [8 `+ ]
; M) w) [; |( f8 @
, g6 ]: k& n3 N9 E 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |