Re: [Numpy-discussion] Announcing Bokeh 0.2: interactive web plotting for Python
Hi, you projects looks really great! I was wondering if you are making use of any pre-existing javascript plotting library like flot or flotr2 ? And if not, what are your reasons ? Thanks, Sebastian Haase On Thu, Oct 24, 2013 at 9:55 PM, Jason Grout jason-s...@creativetrax.com wrote: On 10/24/13 1:42 PM, Peter Wang wrote: On Thu, Oct 24, 2013 at 10:11 AM, Jason Grout jason-s...@creativetrax.com mailto:jason-s...@creativetrax.com wrote: It would be really cool if you could hook into the new IPython comm infrastructure to push events back to the server in IPython (this is not quite merged yet, but probably ready for experimentation like this). The comm infrastructure basically opens up a communication channel between objects on the server and the browser. Messages get sent over the normal IPython channels. The server and browser objects just use either send() or an on_message() handler. See https://github.com/ipython/ipython/pull/4195 Yeah, I think we should definitely look into integrating with this mechanism for when we are embedded in a Notebook. However, we always want the underlying infrastructure to be independent of IPython Notebook, because we want people to be able to build analytical applications on top of these components. That makes a lot of sense. And looking at the code, it looks like you are cleanly separating out the session objects controlling communication from the plot machinery. That will hopefully make it much easier to have different transports for the communication. Here's a very simple example of the Comm implementation working with matplotlib images in the Sage Cell server (which is built on top of the IPython infrastructure): http://sagecell.sagemath.org/?q=fyjgmk (I'd love to see a bokeh version of this sort of thing :). This is interesting, and introducing widgets is already on the roadmap, tentatively v0.4. When running against a plot server, Bokeh plots already push selections back to the server side. (That's how the linked brushing in e.g. this example works: https://www.wakari.io/sharing/bundle/pwang/cars) Our immediate short-term priorities for 0.3 are improving the layout mechanism, incorporating large data processing into the plot server, and investigating basic interop with Matplotlib objects. Great to hear. Jason ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] numpy.savetxt to string?
According to doc, savetxt only allows a file name. I'm surprised it doesn't allow a file-like object. How can I format text into a string? I would like savetxt to accept StringIO for this. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] numpy.savetxt to string?
Which version of numpy are you using? I just tried it with 1.7.1, and it accepted a StringIO instance. The docstring says the first argument may be a filename or file handle ( http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html#numpy.savetxt ). Warren On Wed, Nov 6, 2013 at 1:17 PM, Neal Becker ndbeck...@gmail.com wrote: According to doc, savetxt only allows a file name. I'm surprised it doesn't allow a file-like object. How can I format text into a string? I would like savetxt to accept StringIO for this. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Plotly: Python Sandbox (NumPy supported) and Plotting Library
Hey NumPy users, My name is Matt, and I'm part of Plot.ly, a graphing and analytics startup. We just launched a beta, and wanted to reach out to this group about our Python and Numpy features. *Background.* Plotly's graphing libraries let you make interactive, publication-quality plots in your browser. You can style graphs and analyze data with Python, a GUI, or our grid. Then, download, export, or share your work publicly with a url or privately among other Plotly members. And you can access your graphs from anywhere. You can also plot with our online Python sandbox (*NumPy supported*), and save and share scripts. In particular, here are three features we thought would be of interest to this group: - Python graphing library https://plot.ly/api/python/. Download herehttps://pypi.python.org/pypi/plotly/0.5, or fork it herehttps://github.com/cparmer/Plotly/tree/master/API/packages . - Interactive graphs w/ IPython notebooks (herehttp://nbviewer.ipython.org/7105191 ). - Python command line, from which you can run Numpy. Gallery and scriptshttp://plot.ly/demo/script/ . We'd love to hear what you think, get your feedback, and try to improve based on your advice. As we're just launching, it's super helpful to get feedback and advice, so we really appreciate you checking it out. Thanks so much, Matt https://plot.ly/ l Plotly Twitter https://twitter.com/plotlygraphs l Plotly Facebook https://www.facebook.com/Plotly ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Announcing Bokeh 0.2: interactive web plotting for Python
Hi Sebastian, On Wed, Nov 6, 2013 at 4:55 AM, Sebastian Haase seb.ha...@gmail.com wrote: Hi, you projects looks really great! I was wondering if you are making use of any pre-existing javascript plotting library like flot or flotr2 ? And if not, what are your reasons ? We did not use any pre-existing JS plotting library. At the time we were exploring our options (and I believe this still to be the case), the plotting libraries were all architected to (1) have their plots specified by JS code, (2) interact with mouse/keyboard via DOM events and JS callbacks; (3) process data locally in the JS namespace. Flot was one of the few that actually had any support for callbacks to retrieve data from a server, but even so, its data model was very limited. We recognized that in order to support good interaction with a non-browser language, we would need a JS runtime that was *designed* to sync its object models with server-side state, which could then be produced and modified by other languages. (Python is the first language for Bokeh, of course, but other languages should be pretty straightforward.) We also wanted to structure the interaction model at a higher level, and offer the configuration of interactions from a non-JS language. It's not entirely obvious from our current set of initial examples, but if you use the output_server() mode of bokeh, and you grab the Plot object via curplot(), you can modify graphical and data attributes of the plot, and *they are reflected in realtime in the browser*. This is independent of whether your plot is in an output cell of an IPython notebook, or embedded in some HTML page you wrote - the BokehJS library powering those plots are watching for server-side model updates automagically. Lastly, most of the JS plotting libraries that we saw took a very traditional perspective on information visualization, i.e. they treat it as mostly as a rendering task. So, you pass in some configuration and it rasters some pixels on a backend or outputs some SVG. None of the ones I looked at used a scene-graph approach to info viz. Even the venerable d3.js did not do this; it is a scripting layer over DOM (including SVG), and its core concepts are the primitives of the underlying drawing system, and not ones appropriate to the infovis task. (Only recently did they add an axis object, and there still is not any reification of coordinate spaces and such AFAIK.) The charting libraries that build on top of d3 (e.g. nvd3 and d3-chart) exist for a reason... but they mostly just use d3 as a fancy SVG rendering layer. And, once again, they live purely in Javascript, leaving server-side data and state management as an exercise to the scientist/analyst. FWIW, I have CCed the Bokeh discussion list, which is perhaps a more appropriate list for further discussion on this topic. :-) -Peter ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion