mirror of
https://github.com/balkian/gists.git
synced 2024-11-22 01:32:29 +00:00
This commit is contained in:
commit
04eaafc293
4
custom_palette.py
Normal file
4
custom_palette.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
from matplotlib.pyplot import cm
|
||||||
|
color=cm.rainbow(np.linspace(0,1,len(emotions)))
|
||||||
|
color = dict(zip(emotions, color))
|
||||||
|
color
|
5
customlabels.py
Normal file
5
customlabels.py
Normal file
@ -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])
|
Loading…
Reference in New Issue
Block a user