diff --git a/repos/e654835d4263378a3ac8/custom_palette.py b/repos/e654835d4263378a3ac8/custom_palette.py new file mode 100644 index 0000000..f83fcd3 --- /dev/null +++ b/repos/e654835d4263378a3ac8/custom_palette.py @@ -0,0 +1,4 @@ +from matplotlib.pyplot import cm +color=cm.rainbow(np.linspace(0,1,len(emotions))) +color = dict(zip(emotions, color)) +color \ No newline at end of file diff --git a/repos/e654835d4263378a3ac8/customlabels.py b/repos/e654835d4263378a3ac8/customlabels.py new file mode 100644 index 0000000..8df2512 --- /dev/null +++ b/repos/e654835d4263378a3ac8/customlabels.py @@ -0,0 +1,5 @@ +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]) \ No newline at end of file