How to create a plot with strings?
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
