1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-23 18:02:29 +00:00
gists/repos/Matplotlib tricks/customlabels.py
2021-10-30 15:16:04 +02:00

5 lines
164 B
Python

import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
red_patch = mpatches.Patch(color='red', label='The red data')
plt.legend(handles=[red_patch])