application_vnd.jupyter.stderr_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

# dead and survived based on age of people
figure = plt.figure(figsize=(15,8))
plt.hist([data[data['Survived']==1]['Age'],data[data['Survived']==0]['Age']], color = ['g','r'],
         bins = 10,label = ['Survived','Dead'])
plt.xlabel('Age')
plt.ylabel('Number of passengers')
plt.legend()

base_folder = '../input/'
data = pd.read_csv(base_folder + 'train.csv')

figure = plt.figure(figsize=(15, 8))
plt.hist([data[data['Survived'] == 1]['Age'], data[data['Survived'] == 0]['Age']], color=['g', 'r'], bins=10, label=['Survived', 'Dead'])
plt.xlabel('Age')
plt.ylabel('Number of passengers')
plt.legend()