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');

Answers (1)

1 Comment

Thank you for your answer. When I use "publish" to save the diagram as a pdf it is not saved as a vector graphic. The quality is not good enough ...

Sign in to comment.

Categories

Products

Release

R2018b

Asked:

on 3 Jan 2019

Commented:

on 3 Jan 2019

Community Treasure Hunt

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

Start Hunting!