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
Comments
Post a Comment