|
|
试一下下面这段代码吧,不知道是不是你想要的* Q' B( r7 \. M% R2 d8 U% Z
4 ]( Z+ v" `! e) F3 bx = -pi:pi/10:pi;
" C# M$ \9 f Vy = tan(sin(x)) - sin(tan(x));
2 y7 |& r$ m7 s! U/ Tplot(x,y,'rs-','LineWidth',1,'MarkerEdgeColor','k',..." F/ o1 \8 l' m9 W8 Y
'MarkerFaceColor','g','MarkerSize',10);
, K* v2 C. H: H7 Q3 {) @set(gca,'XTick',[])2 N# h" m' H/ q
box off3 e; H/ ?0 Z0 D; B
ax2 = axes('Position',get(gca,'Position'),...- b# N- q! d& D i/ \, g
'XAxisLocation','top',...0 ]% j" d2 E9 A- S; C" J# n( n
'YAxisLocation','right',...
6 I; S, a- B) U 'Color','none',...2 M1 `4 V p; a
'XColor','k','YColor','k');0 e! n" Y$ B5 p$ W* S: [; a+ ?' ?
set(ax2,'YTick', []);$ z: I) i: ^' ^4 V. ^/ ]
set(ax2,'XTick', []);
5 S" X$ u/ {& _/ h5 }box on |
|