change legend name of ROC

How to change the legend name (class1, class2, ...) of ROC when using
plotroc(Ts,Y)

 Accepted Answer

plotroc(Ts,Y)
hLegend = findobj(gcf, 'Type', 'Legend');
%get text
hLegend.String
% Change
hLegend.String {'One' 'Two' 'Three'} % put your strings here; I assume three are there

More Answers (0)

Tags

Asked:

on 15 Sep 2022

Commented:

on 17 Sep 2022

Community Treasure Hunt

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

Start Hunting!