Unwanted whitespace / gap in figure text before symbols and subscripts in Matlab 2015a for pdf and eps figures

3 ビュー (過去 30 日間)
Hi all,
I'm getting extra unwanted space before a special character / symbol / subscript in my labels. This is pretty much the same problem in the question here: http://uk.mathworks.com/matlabcentral/answers/159732-2014b-axis-label-errors-when-printing-to-postscript. Note I'm running Matlab on Linux.
Try the following, noting the gap between the ( and the degree sign in the pdf and eps outputs
figure;
plot(0:0.01:2*pi,sin(0:0.01:2*pi));
yl = ylabel('Angle (\circ)');
print(gcf,'test_pdf','-dpdf');
print(gcf,'test_print','-depsc');
export_fig(gcf,'test_export','-png');
export_fig(gcf,'test_export','-pdf');
This issue doesn't exist in my Matlab version 2013. I don't want to use the 'Latex' interpreter as this changes all the fonts to the default Latex font. This issue does not exist for bitmap outputs such as png. Finally, it is worth noting that our old friend export_fig does not solve this issue.
Any ideas of a fix for this? Regards, Dom
  2 件のコメント
Debarati Banerjee
Debarati Banerjee 2016 年 6 月 24 日
You may try 'opengl' as the Renderer. You can refer to this bugreport which mentions a similar issue.
Steve
Steve 2017 年 5 月 20 日
Using opengl does not fix the problem.

サインインしてコメントする。

回答 (1 件)

Sherman Ip
Sherman Ip 2019 年 7 月 16 日
This is not a fix but rather a way around it as I have this problem with squares
Use the unicode U+00B0 °

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by