ContextLab / hypertools

A Python toolbox for gaining geometric insights into high-dimensional data
http://hypertools.readthedocs.io/en/latest/
MIT License
1.83k stars 160 forks source link

Legend colors are not updated when colors are set with format strings or color kwarg #166

Closed andrewheusser closed 6 years ago

andrewheusser commented 7 years ago

The legend colors are set by the palette and not updated when the colors are specified manually. To replicate the bug:

# import
import hypertools as hyp
import numpy as np
from scipy.stats import multivariate_normal

# simulate clusters
cluster1 = np.random.multivariate_normal(np.zeros(3), np.eye(3), size=100)
cluster2 = np.random.multivariate_normal(np.zeros(3)+3, np.eye(3), size=100)

# plot
hyp.plot([cluster1, cluster2], ['k', 'r'], legend=['cluster1', 'cluster2'])

outputs this:

download

andrewheusser commented 6 years ago

fixed on text-features