Comments (21)
@awesomebytes for fast data updates, I'd recommend using Plotly.extendTraces
.
More info: https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_api.js#L1349
from plotly.js.
@etpinard at least the ability to update the traces via websocket
from plotly.js.
From the announcement (https://plot.ly/javascript/open-source-announcement/):
R, PYTHON, & MATLAB ENGINEERS AND DATA SCIENTISTS
Plotly can now be used 100% offline in RStudio, MATLAB, or Jupyter notebook free-of-charge. The R, Python, and MATLAB clients for Plotly have always been open-source, while the core graphics layer—plotly.js—was closed-source. Now the entire stack is open-source.
This makes for a better user experience:
- There is no round-trip to Plotly’s server, so plotting is fast.
- For the same reason, you can plot more data.
- In RStudio, Plotly charts now appear natively in RStudio instead of opening in a browser tab.
- Everything is local — You can create charts completely independently from Plotly’s online platform.
I'm still not sure about the JS version. Can anyone confirm if the JS version can now also be used entirely offline?
from plotly.js.
I would gladly try, but the instructions of the tutorial mention login/get
api keys, which, if I don't need them, I guess I need to run some kind of
server. So I don't know where to start. Maybe it's just a matter of time to
get things updated.
2015-11-18 16:00 GMT+01:00 voodah [email protected]:
From the announcement (
https://plot.ly/javascript/open-source-announcement/):
R, PYTHON, & MATLAB ENGINEERS AND DATA SCIENTISTS
Plotly can now be used 100% offline in RStudio, MATLAB, or Jupyter
notebook free-of-charge. The R, Python, and MATLAB clients for Plotly have
always been open-source, while the core graphics layer—plotly.js—was
closed-source. Now the entire stack is open-source.This makes for a better user experience:
- There is no round-trip to Plotly’s server, so plotting is fast.
- For the same reason, you can plot more data.
- In RStudio, Plotly charts now appear natively in RStudio instead of
opening in a browser tab.- Everything is local — You can create charts completely independently
from Plotly’s online platform.
I'm still not sure about the JS version. Can anyone confirm if the JS
version can now also be used entirely offline?—
Reply to this email directly or view it on GitHub
#16 (comment).
from plotly.js.
Hey @awesomebytes - the streaming
API is a hosted service that's provided by plotly - it handles the real-time data-store and the web-socket connections to the charts in the browser. The underlying charting library that streaming uses, plotly.js
, is what's contained in this repo.
You can refresh your own charts in "real-time" by successively calling Plotly.newPlot
in the client.
@voodah - Yes, the JS version can be used entirely offline. See https://plot.ly/javascript for documentation and examples.
from plotly.js.
@awesomebytes Yes it will. Check out any of the examples in the javascript docs (https://plot.ly/javascript) to get started. For live updating, to refresh the entire graph, the code would look something like:
setInterval(function(){Plotly.plot(divid, [{"x": i, "y": i}]);}, 50)
from plotly.js.
Hi everyone, I'm also very interested by this feature (offlline streaming).
@awesomebytes : have you eventually found a way to do it? I've looked at the plotly.py github issues but haven't found anything related.
@chriddyp : actually calling plotly.offline.iplot
in a loop create one plot per call (so resulting in many plots displayed in the notebook).
Thanks a lot!
from plotly.js.
Hey @chriddyp, so it will behave fast as you say in the example with your API (20Hz)?
Is there any example that does that where I can hook up some data to test?
Thank you very much for your answer.
from plotly.js.
@chriddyp But... I have no idea of JavaScript, what about the Python interface?
I'm very sorry if my comments are annoying but I'm very curious to try this stuff. Should I open an issue at https://github.com/plotly/plotly.py ?
I've seen the offline python documentation: https://plot.ly/python/offline/ but I see only an ipython notebook example, not updating the data once the plot is done.
Is there a streaming-like demo, offline?
Is there a way of just publishing to a local url to be accessed by any browser?
Thanks once again.
from plotly.js.
Hi @awesomebytes - yes, please open an issue in the python library repo. You won't be able to remotely update your charts on the web without using the streaming API or your own server infrastructure. If you want to just update your chart locally, you can successively call plotly.offline.iplot
in a loop.
If you want your chart to be accessed by any browser, you need to host your graph on a server. The easiest way to do this is to host your graphs on Plotly (https://plot.ly), which provides a hosting service that is free for public data.
For questions about the python library, post to https://github.com/plotly/plotly.py and for general plotly questions, ask the community at http://community.plot.ly/.
Thanks for your interest!
from plotly.js.
I didn't find a way, I'm sorry.
2016-01-28 15:54 GMT+01:00 Clément Moulin-Frier [email protected]:
Hi everyone, I'm also very interested by this feature (offlline streaming).
@awesomebytes https://github.com/awesomebytes : have you eventually
find a way to do it? I've looked at the plotly.py
https://github.com/plotly/plotly.py issues but haven't found anything
related.@chriddyp https://github.com/chriddyp : actually calling call
plotly.offline.iplot in a loop create one plot per call (so resulting in
many plots displayed in the notebook).Thanks a lot!
—
Reply to this email directly or view it on GitHub
#16 (comment).
from plotly.js.
Any update on your work awesomebytes? That's a feature I really want to in my notebook.
from plotly.js.
Didn't find a way and I'm not actively working on it anymore.
2016-04-24 4:22 GMT+02:00 Jean Bilheux [email protected]:
Any update on your work awesomebytes? That's a feature I really want to in
my notebook.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#16 (comment)
from plotly.js.
After reading through this very helpful issue I concluded that you can easily redraw your plots by constantly calling plotly.offline.plot
in a loop as mentioned by @chriddyp - this may not be exactly what @awesomebytes @JeanBilheux @clement-moulin-frier where after, but here is a very simple example that will redraw a plot random input data once every second for 10 iterations:
import time
import numpy as np
from plotly.offline import plot
from plotly.graph_objs import *
for i in range(10):
time.sleep(1)
plot([Box(y = np.random.randn(50), showlegend=False) for i in range(45)], show_link=False)
Of course this will simply reload a temporary webpage and won't get you high frame rates (I don't think 20 Hz is possible this way), but it's a start.
from plotly.js.
@hyliu1989 Made a very nice solution here:
https://github.com/hyliu1989/PlotlyOfflineStream
from plotly.js.
@jackparmer FYI that's not really streaming, it's replacing the whole plot each timestep, which is not really optimal.
from plotly.js.
Hi there. Hopefully this can be a first step toward the offline streaming. I just found @etpinard gave an example of using extendTraces()
in JS. With that we can probably do the streaming.
Question, if there is a heatmap that I want to update and it is in a subplot, do we still have something like extendTraces()
for it?
from plotly.js.
extend traces is one way to do something like streaming, but it's not close to what plotly does under the hood to allow rich live updating. I understand the motivation for the plotly folks to keep that bit private - it is of course one of the proprietary features of their paid service.
Personally, I've switched to bokeh as it supports true streaming and interactivity.
from plotly.js.
but it's not close to what plotly does under the hood to allow rich live updating.
@nzjrs I'm curious, what kind of rich live updating features are you looking for?
from plotly.js.
@nzjrs I'm new to plotting via python, but am in the same spot.
Will be streaming live graph via browser and will need to add / shift many data points in small time interval.
Performance is in top 3 objectives, so wanting something that can handle efficient streaming / updates.
If this is not natural / intuitive for plotly, I may need to checkout Bokeh or another solution for pushing data to frontend websocket subscribers which can then update/repaint/rerender graph efficiently.
from plotly.js.
@chrisidefix and @chriddyp isn't calling plot repeatedly in a loop going to open up a new tab in the browser for every plot? Or is there a way to have it keep updating the single tab?
from plotly.js.
Related Issues (20)
- Mismatch between legend and line colors when using uppercase css colors HOT 1
- Item toggle behavior when using multiple legends HOT 8
- insiderange on multiple overlaid axes edge case
- [Feature Request] Adding a Button to Copy Image to Clipboard HOT 1
- BUG: standoff causes axis title position to break if no tick labels
- Shapes - fill to infinity/-infinity
- Adding a dendrogram to heatmaps
- Smith Chart (scattersmith) pan & zoom functionality HOT 2
- axes range not working. Range is +-1, data is 0->1.6e10 HOT 3
- ScatterGL throws ` TypeError: r[v] is undefined` when using frames HOT 1
- Clicks are sometimes missed with clickmode layout key HOT 4
- Tooltip pointer (triangle) not correctly positioned with hovermode 'x'
- Plotly chart conflict with touchstart / touchmove event to scroll smartphone screen HOT 1
- [BUG] Rangeslider won't reset after zooming out HOT 1
- Inconsistent behavior when providing an array of marker sizes in "markers" mode on scatter3D
- hoverdistance broken in 3D scatter plots; hover radius vs click radius?
- `scattergl` line plots no longer working after upgrading to 2.29.1 HOT 3
- Combining rangemode tozero and tickformat set to "," produces unexpected results
- REOPENING BUG - pie chart hover label hidden
- Hoverlabel overlaps each other
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plotly.js.