1. 保存fig格式图片
7 i- O: Z( t' |9 k% `print('.\figs\kappa_smNS','-dpng','-r300')
0 x. f" i8 v; x4 ]! X4 E! I7 U% V/ H4 ? W5 a; g
saveas(gcf,'.\figs\kappa_smNS.fig')
2 g2 V5 J2 e) L; K( r- Gsaveas(gcf,['.\figs\kappa_sm',filename,'_spect',num2str(i)],'tiff')
6 _' B9 V9 B( F
/ K' h/ y" {, Y0 N. ]& D2 e! G# k2 B' d; M* P: t
2.全屏显示figure,输出figure8 T( r3 w/ X/ v3 |' r0 C
figure('units','normalized','outerposition',[0 0 1 1]), g* n% J$ e8 P
...
- K( ~, d7 B. ]% F2 p+ U) u6 Dset(gcf,'units','normalized','outerposition',[0 0 1 1])
. [. l, D1 A# ?% l: V V9 f; s; Q) W, Pprint('.\figs\test','-dpng','-r300')
8 c! Q1 T; D$ q3 Z2 q+ |( E$ O0 h! a# k1 f
0 U" }4 Z) |3 o7 O5 o# d& ^
3. save(['F:\data\'],'-struct','data') or save(['F:\data\'],'data')8 W. V2 _% l4 O7 }, C
* I) g6 H9 e# }4 p7 {" ?
- b: s, m3 C# E/ P" F9 q5 a9 V4.透明图片的获取
. [7 X; W' F" _set(gcf,'color','none');
9 R) A7 _$ l0 P. T! j- `set(gca,'color','none');
+ F0 ^* E O* d/ Hset(gcf,'InvertHardCopy','off');
* R- y' _$ h6 ?- b: q# B- q5 ]3 ]! c* Y& Y$ I. D
$ z8 @7 L' g0 z" w运行上面三行命令 Edit->Copy Figure->在powerpoint中粘贴,就得到背景透明的图片。3 w4 T8 E5 e0 N
1 R: u0 B9 y" g- n; n" h6 ]) Z* `; w0 A
5.隐藏坐标轴' I9 J/ i$ d( n1 P2 P" g) z
axis off/ T. [8 c6 d, I
: v/ p; D8 O) q. ^' L% m1 o' h
, b% P& s( j, v% W3 y1 E% Q 转载本文请联系原作者获取授权,同时请注明本文来自叶瑞杰科学网博客。 |