# Fixing Matlab Vector Graphics Output
Clean/Repair .eps PostScript vector graphic files created by Matlab R2016b and Matlab R2017a. (Not working with R2017b and later versions ([yet](https://github.com/Conclusio/matlab-epsclean/issues/10))).
* Paths are grouped together according to their properties
* White line artifacts are fixed
* Broken up polylines are connected back together if they share the same properties (good for post-processing in Illustrator/Inkscape/etc.)
* Adjacent polygons of the same type are merged together (use parameter 'combineAreas')
## Related
* [Why is vector graphics chopped into pieces?](https://de.mathworks.com/matlabcentral/answers/290313-why-is-vector-graphics-chopped-into-pieces)
* [Lines on Patch-Objects after *.EPS/PDF export - e.g. with contourf](https://github.com/altmany/export_fig/issues/44)
## Example
Here is an example of what the .eps file looks before and after fixing it:
```
%%% Matlab Code
z = peaks;
contourf(z);
print(gcf,'-depsc','-painters','out.eps');
epsclean('out.eps'); % cleans and overwrites the input file
```

**Layer count in Adobe Illustrator: 789 (before) vs. 30 (after)**
## Another Example
```
%%% Matlab Code
[X,Y,Z] = peaks(100);
[~,ch] = contourf(X,Y,Z);
ch.LineStyle = 'none';
ch.LevelStep = ch.LevelStep/10;
colormap('hot')
saveas(gcf, 'out.eps', 'epsc');
epsclean('out.eps'); % cleans and overwrites the input file
```

**Layer count in Adobe Illustrator: 11,775 (before) vs. 76 (after)**
## Notes
* If you experience Z-order problems (i.e. the overlappings of your graphics change) try using parameter 'groupSoft' = true.
```
%%% Matlab Code
epsclean('out.eps','groupSoft',true);
```
* If you have separating lines between filled areas ([example - gaps highlighted in yellow](https://user-images.githubusercontent.com/38227689/38556022-18bfe056-3cc0-11e8-89e6-ad3984276b20.png)) try using parameter 'closeGaps' = true.
```
%%% Matlab Code
epsclean('out.eps','closeGaps',true);
```
* Have a look at the tests/cleantest.m script for test cases and examples
* Report any problems here at github with your examples (code or .eps file). I try my best to fix them
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论






























收起资源包目录












共 9 条
- 1
资源评论


Mmnnnbb123
- 粉丝: 785
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 网上开店网络营销策毕业论文.doc
- 搬运机械手PLC控制系统设计[]().doc
- 第11课-认识网络新朋友(课件)信息技术三年级下册-电子工业出版社(安徽)-(2).ppt
- 计算机实习报告.docx
- 最新电气自动化专业求职信100字-电气自动化专业求职信500字(16篇).docx
- 机械工程附自动化专业培养方案.doc
- 最新程序员年度工作总结静态html-程序员年度工作总结及下一年工作计划(十五篇).docx
- 高中数学第二章算法初步阶段质量评估课时作业(含解析)北师大版必修3.doc
- 基于java的小型粮店管理系统进货模块.doc
- 我国农产品网络营销相关问题研究.doc
- 机动车监测站网站建设实施方案.doc
- 基于J2EE平台电子商务系统-毕业设计.doc
- 人工智能及应用-第一章-绪论.pptx
- 基于vb的超市销售管理系统的设计与实现.doc
- xx年三级网络技术上机题及答案.doc
- 网络中心机房建设计教材.ppt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
