Exporting plot with latex axis using \textsf{} to pdf doesn't work
显示 更早的评论
Hallo,
perhaps I'm just googling with wrong key words, but I'm looking for an answer since some hours now and couldn't find an acceptable solution... The Problem:
I want to save a plot to pdf to use it in my LaTeX document. The "T" and the "α" in the axis shall be cursive and the rest shall not be cursive and without serifs. For the plotin matlab my code works fine, but when I try to export it to pdf I recive the error:
"Warning: Error updating Text.
Font cmss10 is not supported."
Is there any work around or other solution for my problem?
Thanks in advance!
I'm using Windows 8.1 and Matlab R2018b
Ein1 = xlsread('Example.xlsx', 'Table1');
f1 = figure('Name','AlphaA');
set(f1, 'Units', 'centimeter', 'Position', [9,5, 16, 10]);
plot(Ein1(:,1),Ein1(:,2),'k-');
hold on
grid on
plot(Ein1(:,1),Ein1(:,3),'b-');
plot(Ein1(:,1),Ein1(:,4),'g-');
plot(Ein1(:,1),Ein1(:,5),'y-');
ylim([0 750])
xlabel('{\it T} in °C');
ylabel('$$\alpha_\text{A} \textsf{\textbf{ in }} \frac{\textsf{W}}{\textsf{m}^\textsf{2}\textsf{*K}}$$','Interpreter','latex')
lgd = legend('1','2','3','4');
set(gcf, 'Units', 'centimeter', 'PaperPosition', [0 0 16 10]);
set(gcf, 'Units', 'centimeter', 'PaperSize', [16 10]);
saveas(gcf, 'Diagram AlphaA', 'pdf');
回答(1 个)
madhan ravi
2019-1-3
0 个投票
https://www.mathworks.com/matlabcentral/answers/437512-my-script-is-not-publishing-figures-even-though-i-have-used-snapnow#comment_655193 - try the first option not sure if it will work.
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Report Generator 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!