Tugas Probabilitas Dan Statistika (Angga Kurniawan)

TUGAS PROBABILITAS DAN STATISTIKA

GRAFIK STATISTIK  DENGAN MENGGUNAKAN PYTHON

Oleh

Angga Kurniawan (1215031012)

KELAS B

Grafik :

grafik

Source Code :

import numpy as np
import matplotlib.pyplot as plt

N = 16
Means = (813004, 997579, 924058, 977349, 831140, 893824, 1009979, 1072040, 1009619, 1011911, 1003733, 1071543, 1176304, 1060805, 955488, 1068800)

arr = np.arange(N)
width = 0.9

plt.subplot(111)
rects = plt.bar(arr, Means, width, color=’lightblue’)

plt.ylabel(‘Jumlah (ton)’)
plt.title(‘Produksi Kentang di Indonesia Tahun 1997-2012’)
plt.xticks(arr+width/2, (‘1997’, ‘1998’, ‘1999’, ‘2000’, ‘2001’, ‘2002’, ‘2003’, ‘2004’, ‘2005’, ‘2006’, ‘2007’, ‘2008’, ‘2009’, ‘2010’, ‘2011’, ‘2012’) )

def autolabel(rects):
for rect in rects:
height = rect.get_height()
plt.text(rect.get_x()+0.05 , height-4000, ‘%d’%int(height), fontsize=10)

autolabel(rects)

plt.show()

File :

 https://docs.google.com/file/d/0Bwj-urC7tJ2Xb1FtNXBlLWNQM3M/edit

Sumber :

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

About diooda

my blog http://diooda.blogspot.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: