Browse Source

hello

master
test2 4 years ago
parent
commit
3b330ed7fd
  1. 17
      examples/PieChart.R
  2. 6
      swarmlab/Makefile

17
examples/PieChart.R

@ -0,0 +1,17 @@
# 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()

6
swarmlab/Makefile

@ -1,9 +1,13 @@
all: hello
all: hello piechart
hello:
Rscript ../examples/HelloWorld.R
piechart:
Rscript ../examples/PieChart.R

Loading…
Cancel
Save