1. 保存fig格式图片/ w# ?3 a7 S# I. N
print('.\figs\kappa_smNS','-dpng','-r300')
8 N$ f; L& E5 A% {
8 W5 B |- W8 L, g& esaveas(gcf,'.\figs\kappa_smNS.fig')7 S7 _4 G: N3 C4 `! [) l( e. `
saveas(gcf,['.\figs\kappa_sm',filename,'_spect',num2str(i)],'tiff')
5 s y4 f O U9 C! B
! b' O$ W- c' E/ v
4 V% M; j/ o2 ?+ P4 M' h7 A2.全屏显示figure,输出figure
5 \9 r' f' a0 j& q7 u2 p* gfigure('units','normalized','outerposition',[0 0 1 1])
6 }6 W, v; c) T, q: A: d; d... e/ y7 m' S! m3 a- L, ^
set(gcf,'units','normalized','outerposition',[0 0 1 1])
1 V% \# X3 V. S* r* B) Wprint('.\figs\test','-dpng','-r300')/ f$ o, o, r$ A: X) E# ?8 t9 P
9 f) z) p1 [1 b& g
/ w9 V0 V j, p
3. save(['F:\data\'],'-struct','data') or save(['F:\data\'],'data')% D- T% L# S0 R& q
, t$ z+ w# C. n# B- Z
) C/ L, Z) R+ n7 @ l7 x4.透明图片的获取; {! y: m0 i: l D. y- P
set(gcf,'color','none');2 _# U9 A# G5 T) I4 N
set(gca,'color','none');
# v4 ~/ T# G; b0 u0 ?7 ^set(gcf,'InvertHardCopy','off');
; f+ D) g Z* _4 c* i/ C& Z3 m" [0 y! q9 Z
/ ?) Z, O% q2 W( m4 g运行上面三行命令 Edit->Copy Figure->在powerpoint中粘贴,就得到背景透明的图片。6 p* D8 R( [ p4 h8 a+ A: Y
5 n! f9 z7 l# P- k) s2 i( q
0 p l( D( k2 x! }: W
5.隐藏坐标轴
! f& m" v& b/ b: g( V3 \axis off# p& z0 T" M7 a3 Y5 ^$ x
: h8 |8 B' Q+ ^ W" f& ]+ C
, P0 B3 ^" u* l2 M8 n* h9 q 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |