Plotting a Legend on a Graph
이전 댓글 표시
I have some code for the following plot: however, when I try to introduce the legend for some reason it gives properties A and B for a square in both cases even though the plots includes points which are circles and others which are squares.
figure
% plot(Rv, ur(Rm,Knm))
hold on
plot(0.0014,403.07,'bs')
% plot(0.00008875,403.07,'bs')
plot(0.0014,662.18,'bs')
plot(0.0007 ,662.18,'bs')
plot(0.0014 ,878.11,'bs')
plot( 0.0007, 878.11,'bs')
plot(0.0014,1122.83,'bo')
plot( 0.0007 ,1122.83,'bs')
plot(0.0014 , 1317.16,'bo')
plot(0.0007,1317.16,'bs')
plot(0.00056,1317.16,'bs')
plot(0.000866,1317.16,'bo')
plot(0.001057,1317.16,'bo')
plot(0.0014 ,1662.65,'bo')
plot(0.0007044,1662.65,'bs')
plot(0.000563,1662.65,'bs')
plot(0.0004226,1662.65,'bs')
plot(0.0002817,1662.65,'bs')
plot(0.0001409,1662.65,'bs')
plot(0.001409,2152.09,'bo')
plot(0.0007044,2152.09,'bo')
plot(0.000563,2152.09,'bs')
plot(0.0004226,2152.09,'bs')
plot(0.0002817,2152.09,'bs')
plot(0.0002113,2152.09,'bs')
plot(0.0001409,2152.09,'bs')
plot(0.001427,2545.36,'bo')
plot(0.001427,2459.07,'bo')
plot(0.001427,2214.61,'bo')
plot(0.001427,9958.53,'bo')
plot(0.001427,9563.07,'bo')
plot(0.001427,9390,'bo')
plot(0.001427,9045,'bo')
plot(0.0008452,10152,'bo')
plot(0.0007043,10152,'bo')
plot(0.0005635,10152,'bo')
plot(0.0004226,10152,'bo')
plot(0.0002817,10152,'bo')
plot(0.0008452,9239,'bo')
plot(0.0007043,9239,'bo')
plot(0.0005635,9239,'bo')
plot(0.0004226,9239,'bo')
plot(0.0002817,9239,'bo')
grid
%lgdc = sprintfc('K_n = %3.1f', Knv);
lgd = legend('A','B');
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!