Callbacks are still not supported yet. Hopefully I can find some time soon 
to work on that.

The data flow is Julia -> json -> js and the same in the other direction: 
 js -> json -> julia.

Even without callbacks, we have the ability to send new data from Julia to 
javascript on the fly. The user is able to send _only_ new data points (the 
entire array is not serialized) and plotly will draw _only_ the new data 
(instead of redrawing the entire image). I haven't benchmarked anything, 
but I believe (hope ;) ) this should be pretty efficient for streaming plot 
updates.  

Once I find the time I will write up an example notebook about how this 
works. However, for the impatient, you can check the docstrings to these 
methods: 
https://github.com/spencerlyon2/PlotlyJS.jl/blob/950a21217ad4bb55d8f64f50522765653f2f31ce/src/api.jl#L233-L300
 
(they are actually much more flexible than just sending new (x, y, z) 
points to be displayed and allow you to stream updates to any chart 
attribute).





On Friday, March 11, 2016 at 12:17:43 PM UTC-5, Tim Holy wrote:
>
> This sounds really exciting! 
>
> I have a couple of technical questions: 
> - Last I checked (a few days ago), the docs said that callbacks aren't 
> supported yet. Has that changed already? 
> - How are data transported? I assume you have to serialize arrays via 
> JSON? 
> When new data arrive, do you reserialize the entire array, or is this 
> doing 
> something uber-clever? 
>
> Best, 
> --Tim 
>
> On Friday, March 11, 2016 08:18:14 AM Spencer Lyon wrote: 
> > New package announcement. I've just registered PlotlyJS.jl with 
> metadata. 
> > The package leverages the plotly.js javascript library to provide a 
> backend 
> > for offline plot generation (no interaction with plotly's web API). This 
> > will be the backend used to generate figures in the soon to be revamped 
> > Plotly.jl package. The latter will serve as the interface between Julia 
> and 
> > plotly's REST API. 
> > 
> > The package has two main goals 
> > 
> >    1. Make it convenient to construct and manipulate plotly 
> visualizations 
> >    2. Provide infrastructure for viewing plots on multiple frontends and 
> >    saving plotly graphics to files 
> > 
> > 
> > 
> > Up to this point I have intentionally not put effort into creating a 
> > plotting API for this package, but rather have made it easy to leverage 
> > plotly's declarative API from Julia. If you are looking for a lot of API 
> > extensions, see the plotlyjs backend in Plots.jl. 
> > 
> > One main feature is a dedicated plotting GUI in an electron window 
> (powered 
> > by Blink.jl). This allows us to have full 2 way communication between 
> Julia 
> > and javascript, taking interactive plotting to a new level (enabling, 
> among 
> > other things, streaming workflows where plots are updated inplace as new 
> > data arrives) 
> > 
> > Check out the docs here: http://spencerlyon.com/PlotlyJS.jl/ 
>
>

Reply via email to