Jumaat, 14 Jun 2013

Tugas Probstat


TUGAS PROBABILITAS DAN STATISTIKA

GRAFIK STASTISTIKA DENGAN MENGGUNAKAN PYTHON 3.3.2

OLEH:
ANJU YOSUA SIRAIT
1215031013
KELAS A


SINTAX PHYTON 3.3.2


import numpy as np

import matplotlib.pyplot as plt


N = 7

Means = (89.16, 92.22, 89.67, 87.25, 89.88, 90.56, 89.34)


ind = np.arange(N)

width = 0.5


plt.subplot(111)

rects1 = plt.bar(ind, Means, width, color='blue')


plt.ylabel('persen')

plt.title('Persentase Balita yang pernah mendapat imunisasi polio  Pada Tahun 2005-2011')

plt.xticks(ind+width, ('2005', '2006', '2007', '2008', '2009', '2010', '2011'))


def autolabel(rects):

    for rect in rects:

        height = rect.get_height()

        plt.text(rect.get_x()+rect.get_width()-0.7 , 1*height, '%d'%int(height),

                 ha='left', va='bottom')


autolabel(rects1)

        

plt.show()






Tiada ulasan:

Catat Ulasan