# Streaming graphs locally

**URL:** <https://community.plotly.com/t/streaming-graphs-locally/624>\
**Category:** 📊 Plotly Python\
**Created:** [March 7, 2016, 4:16pm UTC](https://community.plotly.com/t/streaming-graphs-locally/624 "2016-03-07T16:16:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sorcererofdm](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sorcererofdm](https://community.plotly.com/u/sorcererofdm)\
**Post date:** [March 7, 2016, 4:16pm UTC](https://community.plotly.com/t/streaming-graphs-locally/624/1 "2016-03-07T16:16:21Z")

</div>

Hi,

How would I stream plotly graphs locally? In my case I’m doing some machine learning, and want to stream training data real time to a local server.

---

<div class="post-metadata">

**Author:** ![Miklos](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Miklos](https://community.plotly.com/u/Miklos)\
**Post date:** [March 10, 2016, 3:46pm UTC](https://community.plotly.com/t/streaming-graphs-locally/624/2 "2016-03-10T15:46:55Z")

</div>

This doesn’t appear to be a plotly.js related question.

The plotly streaming services are only for streaming data through our platform. To stream data to a graph locally, you will need to implement your own streaming service and as data is received, add it to your chart (likely using long polling or websockets).

---

<div class="post-metadata">

**Author:** ![mfkenson](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mfkenson/32/194_2.png) [@mfkenson](https://community.plotly.com/u/mfkenson)\
**Post date:** [April 1, 2016, 6:19am UTC](https://community.plotly.com/t/streaming-graphs-locally/624/3 "2016-04-01T06:19:45Z")

</div>

possible to resume streaming? i.e. append data to existing plot

---

<div class="post-metadata">

**Author:** ![sglyon](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/sglyon/32/73_2.png) [@sglyon](https://community.plotly.com/u/sglyon)\
**Post date:** [April 7, 2016, 11:18am UTC](https://community.plotly.com/t/streaming-graphs-locally/624/4 "2016-04-07T11:18:37Z")

</div>

You can look at the `Plotly.extendtraces` and `Plotly.prependtraces` for pushing new points to the end or front of an existing trace attribute respectively.

---

<div class="post-metadata">

**Author:** ![gosha1128](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@gosha1128](https://community.plotly.com/u/gosha1128)\
**Post date:** [August 8, 2016, 3:37am UTC](https://community.plotly.com/t/streaming-graphs-locally/624/5 "2016-08-08T03:37:41Z")

</div>

Hey, do you know if i can set a minimum xrange on a streaming chart ? ( I’m using time as the x-axis…)

---

<div class="post-metadata">

**Author:** ![dandv](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/dandv/32/621_2.png) [@dandv](https://community.plotly.com/u/dandv)\
**Post date:** [October 1, 2016, 6:44pm UTC](https://community.plotly.com/t/streaming-graphs-locally/624/6 "2016-10-01T18:44:48Z")

</div>

How did you learn about `prependTraces` and `extendTraces`? I’m surprised they still haven’t been documented (see [github.com/plotly/documentation/issues/250](http://github.com/plotly/documentation/issues/250), which for some odd reason [I can’t link to](http://community.plotly.com/t/why-cant-i-link-to-github/2286).

CC @Miklos.
