ContextLab / hypertools

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

fixed noshow notebook error #149

Closed chaseWilliams closed 7 years ago

chaseWilliams commented 7 years ago

addresses #148 - while it doesn't fix the multi-window bug, it does prevent the graph from rendering in Jupyter notebook with show=False.

All I did was change plot and draw to use plt.close and plt.ioff respectively

andrewheusser commented 7 years ago

@chaseWilliams thanks for this fix! Will merge, but to clarify, what do you mean by 'multi-window bug'?

jeremymanning commented 7 years ago

i'm good for us to merge

chaseWilliams commented 7 years ago

@andrewheusser sorry for being so vague. Specifically, what I noticed is that if I call hyp.plot with show=False from, say, python's command line interpreter, then while no window actually appears, on my dock (OS X) what appears to be a python "app" starts up. Then, if I call hyp.plot again without saying show=False, then as intended, a window pops up with the graph. However, the previous window with the previous graph also pops up. My fix stopped this from happening in Jupyter Notebook, but for some reason it still doesn't quite work in other environments.

andrewheusser commented 7 years ago

@chaseWilliams no worries, thanks for clarifying! i'll try to get to the bottom of it