Fix dashed and dotted lines in EPS export

버전 1.0.0.0 (461 Bytes) 작성자: Daniel
EPS of dashed and dotted lines export badly. This modifies the EPS file to fix them.
다운로드 수: 5.2K
업데이트 날짜: 2007/8/1

라이선스 없음

I was very frustrated at not being able to export dashed and dotted lines in EPS format, as they come out weird. Finally I found a post somewhere on the internet that suggested editing a certain part of the EPS file to fix it. This is a function which, given the name of the EPS file, will modify the length of the 'dot', making it look better in the image.

I've found it useful to automatically add this function to my standard 'save figure' script, so it is always run.

In EPS file:
/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef

It seems the optimal numbers to go in the EPS file depend on the thickness of the line being drawn. This code changes only the .5 which corresponds to the length of the 'dot'. The number 4 controls the space between the dots. Setting both equal to 1 seems to work well with a Matlab line thickness of 1.5.

인용 양식

Daniel (2024). Fix dashed and dotted lines in EPS export (https://www.mathworks.com/matlabcentral/fileexchange/15743-fix-dashed-and-dotted-lines-in-eps-export), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Additional comment...