Kamis, 13 Juni 2013

Tugas Probabilitas Dan Statistika
Nama : Guntur Nanda .P.
 NPM : 1215031035
 Kelas : A
Sumber Data :

 http://www.bps.go.id/tab_sub/view.php?kat=3&tabel=1&daftar=1&id_subyek=24&notab=1

Listing program :

import numpy as np
import matplotlib.pyplot as plt

alphab = ['2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008']
frequencies = [14,15,15,10,12,12,6,6,4 ]

pos = np.arange(len(alphab))
width = 0.8
ax = plt.axes()
ax.set_xticks(pos + (width / 2))
ax.set_xticklabels(alphab)

plt.title("Jumlah Perusahaan Sapi Perah Menurut Kegiatan Utama")
plt.xlabel("Tahun")
plt.ylabel("Jumlah")
plt.bar(pos, frequencies, width, color='r')
plt.show()