I need create a plot like this:(similar)
Data:
category= { } with 90x1 could be Beef & Pork, Chicken & Fish or Salads
fat and calories is a 90x1 too
I try to do:
figure(1)
xlabel('Fat')
ylabel('Calories')
if category=="Beef & Pork"
plot(fat, calories, 'd')
end
if category=="Chicken & Fish"
plot(fat, calories, 'o')
end
if category=="Salads"
plot(fat, calories, 'x')
end
But only read the first element.

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

질문:

2018년 6월 26일

댓글:

2018년 6월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by