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

animate = static, rotate or trajectory #96

Closed andrewheusser closed 7 years ago

andrewheusser commented 7 years ago

Instead of setting animate to True or False, we could support (at least) 3 plot options:

  1. static plots - this would be the default plot style
  2. rotating plots - with this option, the data would be static, but the camera would rotate around the plot, so that all the data can be visualized easily
  3. trajectory - this would be the same as the current plot when passing animate=True, good for visualizing timeseries data
andrewheusser commented 7 years ago

on second though, i'm wondering if we should leave the animate kwarg as it is and pick a new kwarg. Reasoning is that 1) animate='static' doesn't really make sense and 2) we may not want to mess with the API too much bc its frustrating for users. Maybe something like plot_type or style. open to other suggestions

andrewheusser commented 7 years ago

then we could leave animate=True but phase it out and deprecate it eventually

jeremymanning commented 7 years ago

I think we should have True and False maintain their current behaviors to maintain legacy support for now. We could also add parallel (plot every group together), serial (plot each group in sequence), and bullettime (like from the matrix-- show the final plot but rotate around it)

jeremymanning commented 7 years ago

one more thought (maybe worth a separate issue): it looks like the degree of sub-sampling (using pchip) changes with duration, but it shouldn't-- duration should change the rotation rate (i.e. how many degrees the camera moves with each frame), not the appearance of the data.

this will also fix the issue of static plots not being smoothed whereas animated plots are.

note: if a non-connected plot style is used (for animation or otherwise), no interpolation should be done. we'll have to parse out each line style to see if it's one of the continuous variants, which could get tricky (e.g. if there are some groups with non-connected styles and others with connected styles).

jeremymanning commented 7 years ago

i think this issue is redundant with this one. however, since we have some good discussion in both, maybe it's worth keeping both issues open for now...