运行 ❯
获取您
自己的
网站
×
更改方向
更改主题,深色/浅色
进入 Spaces
# We need this line of code to show graphs in our compiler bitmap(file="out.png") # Create a vector of pies x <- c(10,20,30,40) # Create a vector of labels mylabel <- c("Apples", "Bananas", "Cherries", "Dates") # Create a vector of colors colors <- c("blue", "yellow", "green", "black") # Display the pie chart pie(x, label = mylabel, main = "Pie Chart", col = colors) # Display the explanation box legend("bottomright", mylabel, fill = colors)