Hello! I wanted to make a customized legend for two functions on the same graph and I need both flat text and LaTeX support. At the moment I built something like this:
figure;N = 1:1:length(train_value);plot(N, train_value, N, test_value, 'LineWidth', 1.5);xlabel('numer iteracji', 'fontweight', 'bold');ylabel('\boldmath$\overline{\kappa}_C$', 'Interpreter', 'latex', 'fontweight', 'bold', 'fontsize', 17);l = legend('XXX', 'YYY');set(l, 'Interpreter', 'latex', 'string', 'warto\''s\''c \boldmath${\overline{\kappa}_C}$ dla zbior\''ow treningowych', 'Interpreter', 'latex', 'string', 'warto\''s\''c \boldmath${\overline{\kappa}_C}$ dla zbior\''ow testowych');
It works almost well. The only problem is that the last settings instead of being added overwrite the first settings. As a result, I have a legend for only one graph.
Best Answer