fig, axes = plt.subplots(nrows=1, ncols=1, figsize=(12, 5))
axes.plot(error_list1, label = 'm =0', color='blue')
axes.plot(error_list2, label = '1e-1', color='red')
axes.plot(error_list3, label = '1e-3', color='green')
axes.plot(error_list4, label = '1e-4', color='yellow')
axes.grid()
axes.set_yscale('log')
axes.set(xlabel="iters", ylabel="Log loss function")
axes.legend()
axes.title.set_text('Loss func over different iterations')
The snippet above is adding multiple legend entries to myplot. What could be wrong?