Specified LineStyle of rectangle object reverts to default when printing to pdf
1 view (last 30 days)
Show older comments
So, I've added a rectangle to one of my plots, but when I go to print/export the figure to a pdf it's rendering the rectangle with solid edges instead of dashed ones. Essentially, I'm adding a rectangle representing a zoomed-in region at position vector P using:
rectangle('Position',P,'LineStyle','--','LineWidth',1);
print([filename,'.pdf'],'-dpdf','-painters');
The figure on the left is what shows up in the MATLAB figure window, but when I open the pdf it looks like the figure on the right.
I've tried both the basic print command and export_fig and I'm getting the same result. Is there some sort of obscure print setting I should be using? I can manually edit the rectangle in Adobe Illustrator but I'd rather just have it export the right way.
3 Comments
Star Strider
on 5 May 2014
My pleasure!
Contact MathWorks Support to see if a free update or bug fix is available. Otherwise, report it as a bug. It should work as it’s supposed to, and MathWorks may fix it for free.
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!