line caps for eps figures

2 views (last 30 days)
AB
AB on 2 Jul 2015
Edited: AB on 2 Jul 2015
I am saving figures from Matlab as EPS files (print('-depsc2',fig_name) ) with the 'painters' renderer. When I open those figures in Illustrator, the lines default to "projecting caps", which extend past their end. Since these lines represent data (like error bars on a plot), the end is very important and it should be set to "butt cap" (which does not project).
My question is: how can I change this?
Here's a toy example:
x = 1:10;
y = ones(1,10);
plot(x,y),
xlim([0 11]),
set(gcf,'PaperPosition',[0 0 2 2]),
print('-depsc2','toy.eps');
Then open the eps in Illustrator: the line has a projecting cap. Examining the postscript in Matlab reveals setlinecap is always 2, where I need these numbers to be zeros (zero for butt cap, 1 for round, 2 for projecting).
Thanks!

Answers (0)

Categories

Find more on Graphics Object Identification in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!