Regarding Plotting Pie Chart
Title
Question
How can I make the pie chart with the different colors for different proportions? Is there any parameter I have to set for different colors?
R Plotting-Histograms-and-Pie-Chart 08-09 min 20-30 sec
Answers:
You can use col argument inside the pie function to add colors. For example, there is a pie chart with different colors on https://www.datamentor.io/r-programming/pie-chart/
Simply add more colors by typing their name in the col argument of pie function like
col=c("red","orange","yellow","blue","green", "black", "purple")
If the number of color names exceeds the number of pie chart sections then the extra colors will be discarded and only the required number of colors from the left side will be considered.
If the number of color names is less than the number of pie chart sections then the colors will repeat.
Login to add comment