'How to assign symbols to the data in Matlab

I am trying to plot some data with categories. However, I couldn't manage to plot my data according to the categories and show a legend for them. Therefore, I am asking a little bit help to this issue. Example data;

Name Brand Mt
Enes Renault 2.6
Avni Tofaş 2.38
Asaf Tofaş 3.06

My experience, I have managed to plot these data with two plot command overlaying each other grouping them by Brand. However, this time, one group of data has 2 line (as Tofaş has two data) and the other has only one line data (as in Renault). Thus, x-axis is confusing and not giving a healty graph. The other issue with this, I can't label the x-axis according to Name when I plot two graph overlaying.

figure
plot(table.Mt, 'o');

xtickangle(90)

sizes = size(table.Name);
a1 = gca;
a1.XTick = [1:sizes];
a1.XTickLabel = table.Name;

the output of the code above

[Ism, Ind] =ismember(table.Brand, 'Tofaş');
plot(Ism, 'o')

the output of second code block above

As you can see, when I select only spesific Brand. The rest of arrray filling with zero (0) which I don't want to. What I want is that plotting all data with spesific symbols for each Brand together.

Thank you Enes



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source