Collect and plot data and legend depending on folder name
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello together,
I have multiple data that will be analyzed with TP-Rate and FD-Rate and plot this to ROC curve.
I want to compare data with this principle (german):
(I want to compare datasets from fifferent motors with two microphones and two distances, and three measure scenario)
My folder Strukture is here:
At the moment I get this graph:
I want to have graphs like this:
or this
So, I want to collect a foldername from Motor_Set_x to 2-3 subfolder and print it in legend to compare data from first and second folder.
Here is my code:
for loop with k calculations
end
labels = (1:k);
figure('Name',' receiver operating characteristic','NumberTitle','on');
hold on
p11 = plot(M(:,2),M(:,1),'ro','Color','g'); %Here I can randomize a colors
buffer = [.1 .3 .5];
buffer = repmat(buffer,1,ceil(numel(M(:,2))/numel(buffer)));
buffer(numel(M(:,2))+1:end) = [];
[~, ySortIdx] = sort(M(:,2));
buffer(ySortIdx) = buffer;
labelpoints(M(:,2),M(:,1), name_save, 'E', buffer)
hold on
help_x = 0:0.1:1;
help_y = 0:0.1:1;
plot(help_x,help_y,'--');
xlabel('False discovery rate')
ylabel('True positive rate')
xlim([0 1]);
ylim([0 1]);
lgd = legend([p11],'Result','Location','east');
title(lgd,'n = Measure number')
tube_size_help = sprintf('%.0f',tube_size);
nameX=strcat(name ,'_tube_size_',tube_size_help);
saveas(gcf, 'result_F0_detection_1M.png')
save 'result.mat' M
Do you have some idea? Thank you!
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!