필터 지우기
필터 지우기

axis label messed up when exporting eps

조회 수: 9 (최근 30일)
Lian
Lian 2015년 8월 7일
댓글: Walter Roberson 2018년 4월 1일
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
Walter Roberson
Walter Roberson 2018년 4월 1일
Potentially related to <https://www.mathworks.com/matlabcentral/answers/159732-2014b-axis-label-errors-when-printing-to-postscript >

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam Barber
Adam Barber 2015년 8월 10일
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
Lian
Lian 2015년 8월 11일
Thanks for your help Adam. Unfortunately neither of the methods works. The first print method does not solve the white space problem, and in addition, the figure's aspect ratio is changed to default, which is not good to me. I usually manually alter the figure aspect ratio to make it look better.
The second method does not recognise some special symbols, for my case, \nabla. Without (...,'Interpreter', 'latex'), it can be recognised.
I usually produce the .fig file first and use 'save as' to convert to an eps file.
Lian
Lian 2015년 8월 11일
By the way, mine Linux is Ubuntu 14.04 LTS

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by