Add larger set of colors for plot

This commit is contained in:
Mattéo Delabre 2019-12-15 23:52:57 -05:00
parent 722c02ef24
commit e4457400a6
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
import torch
import matplotlib
from matplotlib.colors import ListedColormap
import seaborn
def get_random_messages(count, order):
@ -61,7 +63,7 @@ def plot_constellation(
ax.grid()
order = len(constellation)
color_map = matplotlib.cm.Dark2
color_map = ListedColormap(seaborn.color_palette('husl', n_colors=order))
color_norm = matplotlib.colors.BoundaryNorm(range(order + 1), order)
# Extend axes symmetrically around zero so that they fit data