I can creating a plot with point by point using matlab, I would think that when the legend and the color is the same for points, Matlab would grouped them and create only one legend for the group of points,the question is, how do I handle this?
Show older comments
So I can creating a plot with point by point using matlab, I would think that when the legend and the color is the same for points, Matlab would grouped them and create only one legend for the group of points,the question is, how do I handle this to group them without having to group them myself, since the database being used is huge
if true
g=1; j=0.05; k=0.05; i=1; sizeOfPatientProc=0; while(i<=300); while(Patient(i)==g) z=i; switch NameOfProcedure{z} case '"Consult Appointment"' plot(g,i-sizeOfPatientProc,'Color',[0.5,0.5,1],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"Ct-Sim"' plot(g,i-sizeOfPatientProc,'Color',[1,0,0],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"READY FOR CONTOUR"' plot(g,i-sizeOfPatientProc,'Color',[0,1,1],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"READY FOR MD CONTOUR"' plot(g,i-sizeOfPatientProc,'Color',[1,0,1],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"READY FOR DOSE CALCULATION"' plot(g,i-sizeOfPatientProc,'Color',[1,1,0],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"READY FOR PHYSICS QA"' plot(g,i-sizeOfPatientProc,'Color',[0,0,1],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"READY FOR TREATMENT"' plot(g,i-sizeOfPatientProc,'Color',[0,1,0],'DisplayName',NameOfProcedure(z),'LineWidth',4); case '"End of Treament Note Task"' plot(g,i-sizeOfPatientProc,'Color',[1,0.8,0.3],'DisplayName',NameOfProcedure(z),'LineWidth',4); otherwise
end
hold on;
i=i+1;
j=j+0.05;
k=k+0.05;
end
g=g+1;
sizeOfPatientProc=i;
end;
xlim([0 30]);
ylim([0 60]);
i=i-1;
y=1:i;
x=ones(i,1);
end
Answers (0)
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!