在大的背景下添加相关坐标, }/ Y8 {% A* S+ f/ R6 z- Z' y! J
close all;figure('position',[50 100 1850 900],'color','w')
- n4 p; w! C; M4 n+ J0 z9 T1 Taxes('position',[0.055 0.2 0.9 0.7])1 T- N) t6 J+ U6 ]# J
itv=linspace(min(rho_xi_eta( ),max(rho_xi_eta( ),30);+ b; {1 t$ G/ |) g
contourf(xi,eta,rho_xi_eta,itv,'edgecolor','none')" {' i2 D# m ?6 Q
hold on;% w3 x3 k3 O" v; l5 P# l3 d1 c# K
contour(xi,eta,rho_xi_eta,itv,'k-','linewidth',1.5)# o5 Z h5 W2 j! a
......, _8 | Z& J" V) h5 {4 J
# A: v+ ~/ n4 r/ \7 b M. e' @5 Y. ~! ]" D, m3 x1 b
% 添加坐标+ a: L+ l3 r7 d# S+ ?2 L
aa=get(gca,'position');
h) m( M( @" |2 h% p# @( gh1=axes('position',[0.5 aa(2) 0.05 aa(end)]);- O, u4 l5 S2 \" J6 S
set(h1,'color','none') %设置透明背景
W& ` K) Q+ Z5 Rset(gca,'ycolor','none') %隐藏y轴
1 @3 J. t% o6 kset(gca,'xcolor','none') %隐藏x轴/ |& n$ T& }5 r' S. m* x% g: a
box off;3 z# W- f" P/ I8 L: X. {
* F0 T- V3 \: A) f4 |9 ~
8 @; _6 F: t0 g4 n. T1 Ucolorseq=mycolor.color94;
! C: W; H/ F4 o' Icolor_str=colorseq(1:70:end, ;
7 |; I% g" k( K. i7 Z0 A2 Qfor nn=2
, {1 {% w& Y: Q. @$ J hold on;
7 S9 {$ n0 Q4 a9 @5 _/ M$ i ii=find(xi(1, ==nn);
, J! S' d" X6 @; V$ y h1=plot(f_eta(:,ii),eta(:,ii),'color',color_str(nn+1, ,'linewidth',2);
4 M# M+ c: M- g* `' m) |6 @4 cend
: e) y1 n3 ?9 [" Y& E7 Glegend('\xi=2'); f0 K/ U& Y/ t! v
1 H( f/ D5 p! K) x# W5 n
+ j0 G8 x) i- h2 M/ ^- _
h=line([0 0],[0 0.9],'color','k');
0 r, w/ k u3 ]set(h,'linestyle','--','linewidth',1.5)4 W4 l. H. \1 h! z" k- G/ a0 ~: Z
set(get(get(h,'Annotation'),'LegendInformation'),'IconDisplayStyle','off'); %设置不显示这条线的legend1 c9 X0 B" w: j3 p
xlim([-1.5 1.5]*1e-8)
" q: \" s8 U3 x" w2 Uset(gca,'xtick',[-10:5:5]*1e-9)
6 U( x" P- i7 {% T* r5 v" l. S6 Ph1=line([-10 5]*1e-9,[delta delta],'color','k');
+ t: P ~& l! a. o7 Tset(h1,'linestyle','--','linewidth',1.5)' p) E3 p6 P2 o, _* p
set(get(get(h1,'Annotation'),'LegendInformation'),'IconDisplayStyle','off');
% }" L5 s3 ]- P& zylim([0 1]); x% U9 X( q2 n+ I
9 Y+ N! D8 q! G% F- c; e+ {
0 M( O8 e& e/ C- p% ~
) Z4 m- z$ x- }5 w$ }8 x
* M. O% [& O* [. m! Y g 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |