[R] Grafik Bar



a <- c(1, 2,3, 4,5)
b <- c(10, 20,30, 4,20)
png('x.png')
mydata <-rbind(a,b)
barplot(as.matrix(mydata), main="contoh bar", ylab= "Total", beside=TRUE, col=rainbow(2))
legend("topleft", c("A","B"), cex=0.6, bty="n", fill=rainbow(2));

Hasil
bar plot

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s