import colorsys

import matplotlib.pyplot as plt

labels = df.Gender.value_counts().index
N = len(df.EmploymentField.value_counts().index)
HSV_tuples = [(x*1.0/N, 0.5, 0.5) for x in range(N)]
RGB_tuples = list(map(lambda x: colorsys.hsv_to_rgb(*x), HSV_tuples))
patches, texts = plt.pie(df.Gender.value_counts(), colors=RGB_tuples, startangle=90)
plt.axes().set_aspect('equal', 'datalim')
plt.legend(patches, labels, bbox_to_anchor=(1.05,1))
plt.title("Gender")
plt.show()

N = len(df.JobRoleInterest.value_counts().index)
HSV_tuples = [(x * 1.0 / N, 0.5, 0.5) for x in range(N)]
RGB_tuples = list(map(lambda x: colorsys.hsv_to_rgb(*x), HSV_tuples))
labels = df.JobRoleInterest.value_counts().index
colors = ['OliveDrab', 'Orange', 'OrangeRed', 'DarkCyan', 'Salmon', 'Sienna', 'Maroon', 'LightSlateGrey', 'DimGray']
(patches, texts) = plt.pie(df.JobRoleInterest.value_counts(), colors=RGB_tuples, startangle=90)
plt.axes().set_aspect('equal', 'datalim')
plt.legend(patches, labels, bbox_to_anchor=(1.25, 1))
plt.title('Job Role Interest')
plt.show()