1. Bar Graph
plt.title('Simple Bar Plot - Income by JobLevel')
plt.bar(df['JobLevel'], df['MonthlyIncome'])
plt.xlabel('Job Level')
plt.ylabel('Monthly Income')
plt.show()

plt.title('Simple Bar Plot - Income by TotalWorkingYears')
plt.bar(df['TotalWorkingYears'], df['MonthlyIncome'])
plt.xlabel('TotalWorkingYears')
plt.ylabel('Monthly Income')
plt.show()

1.1 FacetGrid
facet = sns.FacetGrid(df, col='Department', height=6)
facet.map_dataframe(sns.barplot, x='TotalWorkingYears', y='MonthlyIncome')
facet = facet.fig.subplots_adjust(wspace=.4, hspace=.2)
facet = sns.FacetGrid(df, col='Department', row='JobLevel', height=6)
facet.map_dataframe(sns.barplot, x='TotalWorkingYears', y='MonthlyIncome')
facet = facet.fig.subplots_adjust(wspace=.4, hspace=.2)
facet = sns.FacetGrid(df, col='JobLevel', row='Gender', height=3)
facet.map_dataframe(sns.barplot, x='TotalWorkingYears', y='MonthlyIncome')
plt.show()
facet = sns.FacetGrid(df, col='JobLevel', row='Gender', height=3)
facet.map_dataframe(sns.barplot, x='YearsAtCompany', y='MonthlyIncome')
plt.show()
1.2 Regplot
sns.regplot(df, x='Age', y='MonthlyIncome')

facet = sns.FacetGrid(df, col='Department', row='Gender', hue='Attrition', height=5)
facet = facet.map_dataframe(sns.regplot, x='Age', y='MonthlyIncome')
facet = facet.add_legend()

facet = sns.FacetGrid(df, col='Department', row='Gender', hue='Attrition', height=5, hue_order=['No', 'Yes'], palette={'Yes':'red', 'No':'gray'})
facet = facet.map_dataframe(sns.regplot, x='Age', y='MonthlyIncome', fit_reg=False)
facet = facet.add_legend()

facet = sns.FacetGrid(df, col='EducationField', row='Gender', hue='Attrition', height=5, palette={'Yes':'red', 'No':'gray'})
facet = facet.map_dataframe(sns.regplot, x='Age', y='MonthlyIncome')
facet = facet.add_legend()

facet = sns.FacetGrid(df, col='OverTime', row='Department', hue='Attrition', height=5, palette={'Yes':'red', 'No':'gray'})
facet = facet.map_dataframe(sns.barplot, x='WorkLifeBalance', y='JobSatisfaction')
facet = facet.add_legend()
