Ugly arrow heads after MATLAB export

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.

5 commentaires

Nike Dattani
Nike Dattani le 19 Juil 2015
If no answers, then why no votes ?
Jan
Jan le 19 Juil 2015
Modifié(e) : Jan le 19 Juil 2015
Votes are not usual in this forum, unfortunately. It is not getting clear if the problems concern the arrow function or the EPS export. How did you export the files? Does the exoport or the arrow function fail from time to time?
Nike Dattani
Nike Dattani le 19 Juil 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
Jan le 20 Juil 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 le 21 Juil 2015
Modifié(e) : Walter Roberson le 30 Août 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: https://www.dropbox.com/s/f972vseyx0505ur/b-state_and_spinOrbitDaughters.fig?dl=0

Connectez-vous pour commenter.

Réponses (2)

Jan
Jan le 19 Juil 2015

0 votes

There are dozens of other submissions for drawing arrows. Did you try them?

10 commentaires

Nike Dattani
Nike Dattani le 19 Juil 2015
Thank you Jan! Is this really an "answer" ? or a "comment" ? I will reply to your other questions in the comment where they appear. Cheers!
Jan
Jan le 20 Juil 2015
The purpose of this answer is to find out, if the problem concerns the arrow function or the EPS export. Perhaps this does not get clear immediately. It is very warm here today and after midnight...
Did you try export_fig from the FileExchange?
Nike Dattani
Nike Dattani le 1 Août 2015
Dear Jan, I have now tried export_fig from the FEX. Not only was the output the exact same (as in the image I posted in the question), but it took much longer to produce the EPS! The documentation says that I need ghostscript installed in order to export as EPS. I do have ghostscript installed, but I'm not sure how MATLAB knows that. Anyway, it's really annoying that these arrows don't show up in the EPS exactly as they were in the figure window!
Jan
Jan le 1 Août 2015
This can still be a problem of the tool to display the EPS file. Please attach the FIG and the EPS file to your question.
Nike Dattani
Nike Dattani le 2 Août 2015
I'm extremely certain that it is not a problem with my EPS viewer, because my PDF file compiled from pdftex when the EPS was imported into the TEX file, displays as in the image I posted with my question. Then to double check, I viewed the "pure" EPS (before conversion to PDF) using a different viewer, and it looks exactly as in the PDF.
I did post the .fig file a while ago at the very end of my last comment (in the comment-chain connected to my question, not the one connected to your answer). Now here is also the EPS: https://www.dropbox.com/s/y71osbvqbfyv75v/b-state_and_spinOrbitDaughters.eps?dl=0
Jan
Jan le 2 Août 2015
My company restricts the access to DropBox due to the security implications. It would be kind, if you attach the files in the forum as usual.
Nike Dattani
Nike Dattani le 4 Août 2015
Modifié(e) : Walter Roberson le 30 Août 2015
Dear Jan,
You might notice in my 21 July comment that I did try this, but the files were above the 5MB limit!
Your company is Uni. Heidelberg?
I have now copied the files also to Google Drive, so it should now work: .fig: https://drive.google.com/file/d/0Bzy9fKG7PPRqMDlxcGR5a2FtWXc/view?usp=sharing
Danke schön :)
Nike Dattani
Nike Dattani le 24 Août 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 le 2 Sep 2015
Modifié(e) : Walter Roberson le 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 http://www.mathworks.com/matlabcentral/fileexchange/37371-arrows--generalized-2-d-arrows-plot and it helped with the issue, at least in my situation. But I haven't tested it a lot, though.
Jan
Jan le 8 Fév 2016
Modifié(e) : Jan le 8 Fév 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange

Réponse apportée :

Jan
le 9 Fév 2016

Community Treasure Hunt

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

Start Hunting!

Translated by