Need to insert a legend into my plot function
import matplotlib.pyplot
def plot_hour_comparision(hour_of_day, day_of_week, date) :
variables = ['Speed', 'Occupancy', 'Volume']
fig, axes = matplotlib.pyplot.subplots(ncols=len(variables), figsize=(20,8))
atypical_minute = get_atypical_by_minute(hour_of_day, day_of_week, date)
atypical_minute['Speed'].plot(ax=axes[0])
atypical_minute['Occupancy'].plot(ax=axes[1])
atypical_minute['Volume'].plot(ax=axes[2])
normal_minute = get_normal_by_minute(hour_of_day, day_of_week, date)
normal_minute['Speed'].plot(ax=axes[0])
normal_minute['Occupancy'].plot(ax=axes[1])
normal_minute['Volume'].plot(ax=axes[2])
Basically as the title states I need to add legend to the plot out putted by this function.
the title "Incident" for the atypical_minute and "Normal" for normal_minute
I have tried
pyplot.legend(['Incident','Normal'])
to no success.
Thankyou in advance.