Legend using pre-defined labels Defining legend labels with plots. import matplotlib.pyplot as plt import numpy as np # Make some fake data. a = b = np