how to make a legend for a single point
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi,
I have a problem with making a legend, I have used this code to make a graph:
figure; hold on
for i = 0:0.005:1
C_vm=(1-i)*C_al+i*C_sic; % i stands for the folume fraction
Cm_1212_voigt=C_vm(4,4) % for a isotropic material
plot(i,Cm_1212_voigt,'.','color','green')
end
But when I want to make a legend of this graph made of points, I get a legend of all the points on that line. I just want a legend of a single point. How can i make it happen?
댓글 수: 0
채택된 답변
madhan ravi
2019년 9월 17일
h=plot(i,Cm_1212_voigt,'.g') % inside loop
legend(h,'Points') % outside loop
댓글 수: 3
madhan ravi
2019년 9월 18일
You put some random code with missing datas and you ask one question. With a hunch an answer is being given and after a while another comment again with missing datas and then you expect an answer by magic?
추가 답변 (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!