mila-iqia / blocks-extras

A collection of extensions to the Blocks framework
MIT License
27 stars 40 forks source link

Plotting within iPython #10

Open mdda opened 9 years ago

mdda commented 9 years ago

In the run-up to the PyCon in SG, I collided head-on with problems embedding 'live' blocks-bokeh plots within iPython notebooks.

Fortunately, I was able to hack together something that worked (there's a screen grab at http://redcatlabs.com/2015-06-19_Presentation-PyConSG/#/8/5 ). Moreover, it actually worked 'live' on the day!

So, now I'd like to submit a PR with the updated 'notebook-aware' code. However, I can't really tell if my (substantial) changes will have broken the previous server-session behaviour (in particular, iPython requires that the figures do their initial 'show()' as 'lines' during the Plot object initialisation, rather than dynamically once the first data point arrives).

Is the original author of plot.py around to bounce a PR off - so that it can be checked no to mess up their use-case?

rizar commented 9 years ago

The author of the live-plotting extension is @bartvm , but AFAIK he is currently at an internship. He was also interested in integration with IPython. @bartvm , would you have time to review this PR?

Nice presentation, by the way! And thanks for giving Blocks a bit of spotlight :)