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

add legend option #25

Closed andrewheusser closed 7 years ago

andrewheusser commented 7 years ago

to movie plot as well?

jeremymanning commented 7 years ago

how do legends currently work in this toolbox? if we're supporting legends in the static plots, we should also support them in the animated plots.

a syntax that could potentially be convenient would be to have a legend flag with a default value of None. setting legend=('label1', 'label2', ...) (where you pass in a list of labels, of the same length as the list of data matrices, throwing an error if the list lengths don't match) would create a legend with each trajectory's line style.

for example, something like:

hyp.plot((x1, x2, x3), ('-', ':', '.'), legend=('apples', 'bananas', 'cats'))

andrewheusser commented 7 years ago

legends currently aren't supported, but I'm on board with adding them. that syntax looks good to me!

jeremymanning commented 7 years ago

ok! will they work for animated plots also?

andrewheusser commented 7 years ago

yep! planning to support that

andrewheusser commented 7 years ago

This is now implemented on #42

jeremymanning commented 7 years ago

can we close this issue? e.g. does it work for both animated and static plots?

andrewheusser commented 7 years ago

yes, this is working in both. closing..