3

If I export my matlab figure as an eps using:

print('myfig','-depsc')

I then open it in another software, in my case Illustrator CS6. The text appears ok, but what should be a single text box, say a legend entry, is actually multiple text boxes arranged so that it looks like one. In the image below, the black text is what it looks like first, but I have also shown a copy of the same text, with each text box a different color. enter image description here

If I want to edit any of this its very difficult as the space will then be messed up. Also if I change the font, the kerning gets messed up. I have also tried using the text command to place text on the axis, and this also ends up in multiple text boxes.

Is there any way to fix this? Am I missing something?

Just to be clear, I would like to fix matlab's eps, Not use a different software.

will
  • 377
  • 1
  • 10
  • 1
    Try `export_fig` from FEX. – Ander Biguri Oct 02 '15 at 10:13
  • Thanks @AnderBiguri, if possible I want to avoid 3rd party things as this code needs to be usable for other people. In order to make an eps in export_fig, you need pdftops installed. – will Oct 02 '15 at 10:19
  • If your figure data is managable, then switch to `pgfplots` and you will not even remember about these problems – percusse Oct 02 '15 at 10:43
  • @percusse I am trying to stay within Matlab for now. As I can do my calculations and plotting together. At the minute I'd prefer not to replace matlab as my plotting tool. – will Oct 02 '15 at 11:05
  • Depends on what you do with the resulting eps file. If it goes to a TeX file then you don't change anything in your workflow – percusse Oct 02 '15 at 11:32
  • @percusse no, these figures need to go into illustrator for other annotations etc. The final use isn't TeX either. – will Oct 03 '15 at 15:30
  • have you tried saving as `.svg` instead and open in illustrator ? – bla Oct 24 '15 at 06:00
  • @bla yes I have tried, but svg gives me the text as a shape, not as an editable text. – will Oct 24 '15 at 08:58

0 Answers0