How can I customize the organization of pie slices?

4 views (last 30 days)
By default Matlab arranges the slices in the pie function alphabetically. Does anyone know how to customize the order of the slices of the pie?
Here is an example of my code:
ex=[{'FF'};{'FF'};{'FF'};{'FN'};{'FN'};{'FN'};{'FI'};{'FI'};{'FI'};];
pie(categorical(ex))
As you can see it orders the slices alphabetically, whereas I would like to have FF,FNR, FI (from top going counter-clockwise) instead of FF, FI, FN. In the real code there are more categories so order becomes more important.
I couldn't find anything in the documentation for the function and through a google search, sorry if I missed anything.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!