700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > matlab中得到透明背景图片的方法 如何在Matlab中得到透明背景的图片?

matlab中得到透明背景图片的方法 如何在Matlab中得到透明背景的图片?

时间:2018-08-22 05:31:28

相关推荐

matlab中得到透明背景图片的方法 如何在Matlab中得到透明背景的图片?

MATLAB输出的矢量图往往不是透明背景的,这样插在ppt中就会很难看,就像贴了膏药似的。关于在MATLAB中如何得到透明背景的矢量图,我有个经验就是:用MATLAB导出pdf图形(而不是eps图形),然后用Acrobat另存成eps图形,往往就是透明的了。不过,如果一个图形包含多个子图,那么很可能只有第一个子图的背景是透明的,其余子图背景仍为白色。

附:

by alexxl -02-11

在网上发现如下codes,可以生成透明图形。

% If you ever wondered how to get a matlab figure transparent (particularly usefull when you export it to formats that feature transparency, like eps, gif, png, etc.), here is how you do it:

% you created a figure and it is "current". % the following, you could have guessed

set(gcf,'color','none');

set(gca,'color','none');

% but this following little detail took me ages to figure out

set(gcf,'InvertHardCopy','off');

打开一个.fig的文件,在command中运行上面三行命令 Edit->Copy Figure->在powerpoint中粘贴,就得到背景透明的图片。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。