MATLAB Answers

Ugly arrow heads after MATLAB export

5 views (last 30 days)
Nike Dattani
Nike Dattani on 17 Jul 2015
Answered: Jan on 9 Feb 2016
In the figure window my arrows look beautiful (see top panel of attached image), but when I export to EPS the arrows become horrendously ugly (see bottom panel of image). How do I fix this?
I used to use the ARROW.m package from the FEX, but it was very bug-infested (I'd run a figure-generating script once, and the arrow would look beautiful, then I'd run it again with no changes made and it would come out extremely small and ugly). Also I've read that it doesn't work well in 2014b, which is the only version I have available.


Show 2 older comments
Nike Dattani
Nike Dattani on 19 Jul 2015
Thanks Jan! I exported by clicking "File -> Save as EPS" in the MATLAB figure Window. My hunch is that MATLAB's arrow function is fine (because in the MATLAB figure window they look perfect). It's common wisdom that MATLAB's export function has problems, but that's usually with the figure being cut off and such. It's a surprise that the arrows don't export properly. However, to answer your question: the MATLAB's arrow function doesn't fail from time to time... I made these arrows in MATLAB's Figure Window using the GUI, and they look find in the Figure Window. Cheers!
Jan on 20 Jul 2015
So "then I'd run it again with no changes made and it would come out extremely small and ugly" concerns the export. It is strange, that the results of the epxort are such different, when the exact same procedure is applied before. Could you provide a piece of code which reproduces the problem?
Nike Dattani
Nike Dattani on 21 Jul 2015
Dear Jan, That sentence, was actually about ARROW.m in the FEX, and it concerns the actual figure that shows up in the Figure Window GUI, well before any exporting occurs. But the fact that ARROW.m is not consistent (can give drastically different results when the code is re-run) is not my primary concern here. I'm concerned that the arrows in the top panel of my screenshot look beautiful in the figure window, but ugly in the EPS (bottom panel). The .fig file is included as an attachment in this comment. Maybe when you export it to EPS you don't have the same problem as me in the quality of the arrows. File exceeds 5MB limit, here is the .fig file:

Sign in to comment.

Answers (2)

Jan on 19 Jul 2015
There are dozens of other submissions for drawing arrows. Did you try them?


Show 7 older comments
Nike Dattani
Nike Dattani on 24 Aug 2015
Dear Jan, Could you please delete this as an "answer", since it is not an ANSWER to the question? It is more of a comment. But ASKING me if I've tried other submissions is not an answer. You also suggest that there are dozens of submissions for making arrows, but not suggested one that works, so the question is still unanswered. Also, I could not even find ONE dozen results when searching for "arrow" or "arrows".
I'm worried that this question might HAVE an answer, but the question is not getting enough attention because it looks like it has been answered.
Taras Stanislavchuk
Taras Stanislavchuk on 2 Sep 2015
I also had a problem with arrowhead distortions in eps figure converted from matlab. I just tried arrows.m code from here and it helped with the issue, at least in my situation. But I haven't tested it a lot, though.
Jan on 8 Feb 2016
@Nike: I hesitate to delete the "answer", because the discussion in the comments is useful. But I'm going to push the question from time to time.
I cannot check the different FEX submissions for you, because I do not have your Matlab version 2014b. Having some example code to reproduce the problem would be a benefit also.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by