MATLAB Answers

axis label messed up when exporting eps

8 views (last 30 days)
Lian
Lian on 7 Aug 2015
Commented: Walter Roberson on 1 Apr 2018
I have R2015 install on my linux machine. I have some plots with short math expressions as axis labels. They look fine in .fig files, but when exported to .eps, the labels are messed up by random white spaces in between. Any solution?
  1 Comment
Walter Roberson
Walter Roberson on 1 Apr 2018
Potentially related to <https://www.mathworks.com/matlabcentral/answers/159732-2014b-axis-label-errors-when-printing-to-postscript >

Sign in to comment.

Answers (1)

Adam Barber
Adam Barber on 10 Aug 2015
Hi Lian,
I tried the following on my Debian installation using MATLAB R2015a:
plot(1:10, exp(1:10));
xlabel('x')
ylabel('y = e^x')
print('testEPS.eps', '-dpsc2')
as well as using the LaTeX interpreter:
xlabel('$x$', 'Interpreter', 'latex')
ylabel('$y = e^x$', 'Interpreter', 'latex')
In both cases, the resulting EPS looked fine when I viewed it with "Document Viewer".
Can you post how you are setting up your figure, the FIG and EPS files, as well as the print command you are using to create the EPS file? There may be something that I am missing in my reproduction steps.
Thanks,
-Adam
  2 Comments
Lian
Lian on 11 Aug 2015
By the way, mine Linux is Ubuntu 14.04 LTS

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!