# Draw Pie Chart in R # Get the library. library(plotrix) # Data for Pie chart x = c(4, 1, 3, 1, 2) labels = c('breakfast', 'brunch', 'lunch', 'snacks', 'dinner') colors = c('#4286f4','#bb3af2','#ed2f52','#efc023','#ea7441') # Give the chart file a name. png(file = "/root/piechart.png") # Plot the chart. pie3D(x, labels=labels, explode=0.1, height=0.05, main='Daily Diet Plan', col=colors) # Save the file. dev.off()