Adding Legend to Perfcurve
显示 更早的评论
I am plotting "perfcurve" but class 2 is shown as a green circle in the legend. How can fix it? Thanks for the help.

for m = 1:nClasses
[FPR,TPR,~,AUC,OOP] = perfcurve(Y,score(:,m),m,'XCrit','fpr');
Legend{m} = strcat(['Class ',num2str(m),' AUC ',num2str(AUC)]);
plot(FPR,TPR,OOP(1),OOP(2),'go','LineWidth',1,'MarkerSize',6)
xlabel('FPR','FontSize',10,'FontWeight','Bold');
ylabel('TPR','FontSize',10,'FontWeight','Bold');
grid on;
hold on;
end
legend(Legend,'FontSize',8,'FontWeight','Bold','Location','Southeast')
hold off;
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!