Matlab: Explicitly specifying pie graph slice color
问题 I'm creating a pie graph. pie([a,b,c,d]); Is it possible to explicitly change the color of the individual slices? For example; if I wanted the slices for a and b to always be green and c and d to always be blue, regardless of their size, how would I do that? It seems to me that a color map shades using the size of the slice not necessarily the order in which it was given to the pie function. 回答1: The colors of the pie are determined by the axis colormap. So define a matrix with as many rows