pie chart - Matlab: Explicitly specifying pie graph slice color -


i'm creating pie graph.

pie([a,b,c,d]); 

is possible explicitly change color of individual slices?

for example; if wanted slices , b green , c , d blue, regardless of size, how that? seems me color map shades using size of slice not order in given pie function.

the colors of pie determined axis colormap. define matrix many rows number of pie wedges, , use colormap. first color refers first value (a), etc.

for example:

pie([3 2 4 1]) colormap([1 0 0;      %// red           0 1 0;      %// green           0 0 1;      %// blue           .5 .5 .5])  %// grey 

enter image description here


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -