Here is the figure. You can see the difference in the font style.
Change font style in yyaxis subplots
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to change the label font to latex style. But somehow the style does not change for the yaxis in the subplots. Any advice. Best regards Henrik
See the code. data attached.
Aktor = importdata(['Aktor1.w_l']);
Aktor_freq = Aktor(:,1);
Aktor_ampl = Aktor(:,2);
Aktor_phase = Aktor(:,3);
Aktor_length = length(Aktor(:,1));
fig = figure (1);
set(fig, 'Units', 'normalized', 'Position', [0.2, 0.1, 0.5, 0.3]);
%%Plot Ampl- und Phasengang
ax1 = subplot(121)
x1 = Aktor_freq;
xlim([Aktor(1,1) Aktor(Aktor_length,1)]);
xlabel('Frequenz in Hz', 'FontSize', 12,'interpreter','latex');
y11 = Aktor_ampl;
y12 = Aktor_phase;
yyaxis left
semilogy(x1,y11,'LineWidth',1.5);
ylabel('Admittanz in S', 'FontSize', 12,'interpreter','latex');
grid on
yyaxis right
plot(x1,y12,'LineWidth',1.5);
ylabel('Phase in °', 'FontSize', 12,'interpreter','latex');
%%Imaginär und Realteil
ax2 = subplot(122);
x2 = Aktor_ampl.*cos(deg2rad(Aktor_phase));
y21 = Aktor_ampl.*sin(deg2rad(Aktor_phase));
plot(x2,y21,'LineWidth',1.5);
xlabel('Realteil', 'FontSize', 12,'interpreter','latex');
ylabel('Imaginärteil', 'FontSize', 12,'interpreter','latex');
grid on;
print('-dpng', ['Amp und Phase Aktor' num2str(iAktor) '.png'], '-r500');
end
4 Commenti
Jan
il 23 Nov 2017
@Henrik: Very nice! When the latex interpreter fails, the text is displayed without interpretation and this changes the font also. Do you get a warning message in the command window? If not, it is worth to send an enhancement request to MathWorks.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Labels and Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!