I only need to change the fontsize of ytick, without affecting xticks. How can I do that?
% MAE
subplot(2, 2, 1);
bar([1:3]-0.15, MAE_10, 0.3, 'FaceColor', color_10);
hold on;
bar([1:3]+0.15, MAE_30, 0.3, 'FaceColor', color_30);
hold off;
set(gca, 'XTick', [1, 2, 3], 'XTickLabel', {'Bayesian(weak)', 'Bayesian(non-informative)', 'Frequentist'}, 'TickLabelInterpreter', 'latex', 'FontSize', 12);
title('MAE', 'Interpreter', 'latex');
legend('10 Forecasting', '30 Forecasting', 'Location', 'northwest');

 Akzeptierte Antwort

Voss
Voss am 17 Apr. 2024

1 Stimme

ax = gca();
ax.YAxis.FontSize = 20;

2 Kommentare

Hamed
Hamed am 17 Apr. 2024
Thanks!
Voss
Voss am 17 Apr. 2024
You're welcome!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Properties finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 17 Apr. 2024

Kommentiert:

am 17 Apr. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by