markers in the plot

25 Ansichten (letzte 30 Tage)
Nelly
Nelly am 1 Aug. 2012
Kommentiert: Ali am 29 Okt. 2017
Hi there. I need to plot something with markers at different time intervals:
for instance: if t==30 or t==100 I need to sign this very moment on my plot(x,y) with some kind of marker 'o' or '+' (no matter). For some reason I can't succeed to do it. The marker appears at this point on the curve at t=30 and after it diappears as the simulation goes on. Thanks a lot.
  1 Kommentar
Ali
Ali am 29 Okt. 2017
if true
--------------------------------------------------- code start
This is an example for your case Nelly
Input is "Input_Data", two dimension matrix
Marker_Counter=1;
figure6=figure;
Markers = {'+','o','*','x','v','d','^','s','>','<'};
for i=1:10:size(Input_Data,1)
TPR=Input_Data(i:i+9,7);
FPR=Input_Data(i:i+9,8);
plot(FPR,TPR,strcat('-',Markers{Marker_Counter}));
Marker_Counter=Marker_Counter+1;
hold on
end
plot([0.5 1],[0.5 1],'--');
legend('Minpts = 100','Minpts = 200','Minpts = 300','Minpts = 400','Minpts = 500','Minpts = 600','Minpts = 700','Minpts = 800','Minpts = 900','Minpts = 1000','','Location','SouthEast');
xlabel('FPR or (1-Specificity)','FontSize',12,'FontWeight','bold'); ylabel('TPR or Spensitivity)','FontSize',12,'FontWeight','bold');
title('ROC Space');
close(gcf);
-------------------------------------------- code end
end
--------------------------------------- picture link preview
<</matlabcentral/answers/uploaded_files/92608/untitled.bmp>>

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by