I have this coding and scatter plot.
# model
t_min = data.index.min()
t_max = pd.Timestamp('2015-01-01')
plt.figure(figsize=(18,5))
plt.xlim(t_min, t_max)
location_filter = data.location == 'Fitzroy Gardens'
time_filter = data.index < t_max
data_filtered = data[location_filter & time_filter]
#boards = data_filtered.boardid.unique()
plt.plot(data_filtered.index, data_filtered.temp_avg, ',', c='g', alpha=.9)
plt.show()
I want to color the scatterplot using the 'boardid' column which is a categorical variable includes 5 unique board ids. So, I want to have 5 different colors in the scatterplot. How can I do this using matplotlib?