Open andrewcstewart opened 11 years ago
yes! This would let us (finally) plot remotely without any X-window forwarding nonsense.
I'm happy to do the fork. Would that change to d3py_template.html and a couple edits to .show() do it you think?
I was playing around with this on an ec2 hosted notebook and I was getting the strangest behavior. I replaced every instance of 'localhost' I could find with the public IP of the instance but the html generated by d3py still referred to localhost in the url references.
On a possibly related note, 9 times out of 10 running fig.show() would fire up SimpleHTTPServer but then hang the cell.
Perhaps a slightly simpler solution here would be to allow the d3py object to directly print html? Although the json would have to be served some how.
I imagine d3py_template and .show() and ._serve() should do it! Don't know what's up with the EC2 instance - let me know when your pull request is ready for review!
We have (or at least, had) a .save() method that might do what you want for the notebook...
I have it working https://github.com/andrewcstewart/d3py
Once thing I'm not happy about is not being able to run IPython.core.display.HTML inside a function (figure.display()).
Make a pull request and we'll get the process going to fold it into the main repo!
It'd be nice to let this work on non-localhosts (like ec2 instances). Right now d3py/d3py_template.html has localhost hard coded, ie:
It would be nice if this was templated to
...And anywhere else that change would have to be made.