hope288
hope288

Reputation: 1445

Plotting two variables and grouping by classes using 3 different colors and symbols in matlab

I am having a hard time grasping plotting in matlab, when I run this line:

gscatter(wine1.Alcohol,wine1.Ash,wine1.Class,'br','xo')

It shows:

enter image description here

But I obviouly want the third class to be a different color, how can I do that?

Upvotes: 0

Views: 650

Answers (1)

hope288
hope288

Reputation: 1445

So I solved it with this:

gscatter(wine1.Alcohol,wine1.Ash,wine1.Class,'rgb','osd')

which gives me:

enter image description here

Awesome it works!

Upvotes: 1

Related Questions