在大的背景下添加相关坐标& x+ C+ t; o) Y8 X$ m
close all;figure('position',[50 100 1850 900],'color','w')/ f& h3 x7 Q! h* `( ]
axes('position',[0.055 0.2 0.9 0.7])$ |" |& q9 \0 r1 B- d
itv=linspace(min(rho_xi_eta( ),max(rho_xi_eta( ),30);; a2 |4 n" ^; y$ }" ?* c4 c
contourf(xi,eta,rho_xi_eta,itv,'edgecolor','none')6 @/ K" r" P6 U. X
hold on;& ?+ Q$ l( c3 s2 c$ r# m
contour(xi,eta,rho_xi_eta,itv,'k-','linewidth',1.5); c w4 }3 D, `, Z& p
......
6 L4 F+ f. |- D9 r: d0 N# x
0 g& v$ w' ^- G! W
: C( w, Y3 l6 j% 添加坐标
. F* _# ]+ D7 L+ F+ L( k1 aaa=get(gca,'position');
" m. b5 W0 O2 ~5 H$ n. v% ah1=axes('position',[0.5 aa(2) 0.05 aa(end)]);3 L+ G ^: V4 j6 V0 v/ D) z
set(h1,'color','none') %设置透明背景( l1 S- q3 K9 S$ }- ]* g7 L
set(gca,'ycolor','none') %隐藏y轴9 _4 G! V6 k4 l$ D) f0 X4 S( r, Z
set(gca,'xcolor','none') %隐藏x轴
, I! b; @* r+ Pbox off;, Z1 y, X' q5 E( o- e
$ V% p/ @1 C; H( ]. F4 i
/ Y( v2 g1 V) r* Acolorseq=mycolor.color94;& [, Z7 Q! V6 P, \- k) s6 y% B
color_str=colorseq(1:70:end, ;4 Z+ n" V. c% B+ j+ \
for nn=2- r4 K2 p1 `: p/ v/ g
hold on;
1 S3 i% g7 |" _, P1 c. m t# B+ i ii=find(xi(1, ==nn);8 m1 [% @9 }1 d8 Y9 q
h1=plot(f_eta(:,ii),eta(:,ii),'color',color_str(nn+1, ,'linewidth',2);
7 S2 O3 ~2 P, Q3 X, A5 d! qend# w+ N% ]+ l" i& y8 f c; [% K
legend('\xi=2')# M. l) g s4 o8 b5 t# `* {! G0 p
" F3 r# Y3 B" V9 h$ ?. k/ T+ E
* H2 K# {& e4 S) lh=line([0 0],[0 0.9],'color','k');
7 U5 Y/ V; a' A+ ?6 g6 Aset(h,'linestyle','--','linewidth',1.5)) w0 ?) s! D) w Z) a0 e$ _* i7 m9 n
set(get(get(h,'Annotation'),'LegendInformation'),'IconDisplayStyle','off'); %设置不显示这条线的legend5 _" e- D) |# \# D4 B2 F
xlim([-1.5 1.5]*1e-8)8 U# t3 g8 w$ W& |3 A$ L( J' H5 S6 a7 R! w
set(gca,'xtick',[-10:5:5]*1e-9)1 Q' ^& {6 Y7 U, G6 i
h1=line([-10 5]*1e-9,[delta delta],'color','k');0 q/ }8 ~9 n; j( V! s- d- u. V
set(h1,'linestyle','--','linewidth',1.5)
7 K; q' p) ?5 b: z; T X" W$ Lset(get(get(h1,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');- U: \ [7 w( o) e& V
ylim([0 1])9 s5 d/ i e+ ^
& {! w2 X- ]. c# m' l5 i/ D. v
! X8 Y/ }% ~! A
1 \( Y: P+ I4 k! B7 h5 x
2 J+ s0 y: E0 ?6 i% h+ x# j0 B 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |