from IPython.display import HTML
HTML('<iframe src=http://en.wikipedia.org/wiki/Old_Faithful width=1000 height=500></iframe>')
figsize
fontsize
16The dataset can be found in ../../data/faithful/faithful.csv and the documentation is available in ../../data/faithful/faithful.html.
%matplotlib inline
from matplotlib import pyplot as plt
import csv
eruption_time = []
waiting_time = []
with open('../../data/faithful/faithful.csv','r') as f:
fieldnames = f.readline().strip().split(',')
my_csv_reader = csv.DictReader(f, fieldnames=fieldnames, delimiter=',')
for row in my_csv_reader:
eruption_time.append(float(row['eruptions']))
waiting_time.append(float(row['waiting']))
"""
Write your code here!
"""
fig = plt.figure(figsize=(10,10))
plt.subplot(211)
plt.hist(eruption_time, bins=20)
plt.title('Duration of Eruption', fontsize=16)
plt.xlabel('time [min]', fontsize=16)
plt.ylabel('#', fontsize=16)
plt.subplot(212)
_ = plt.hist(waiting_time, bins=20, color='r')
plt.title('Time between Eruptions', fontsize=16)
plt.xlabel('time [min]', fontsize=16)
_ = plt.ylabel('#', fontsize=16)