You can try setting the .follow and .follow_interval on a DataRange1d:
This is similar to what you ask, it will allow you to control over the width of the x-range in data space, e.g. But there is nothing currently built into Bokeh that allows you to control by specifying "last N points". For that you would have to write some kind of custom extension.
However, be advised that streaming data into the browser indefinitely is effectively an intentional memory leak -- do it for long enough or at a high enough rate and the browser will eventually become very unhappy. It's for this reason that the .stream method on column data sources accept a "rollover" limit to automatically truncate data source columns. Of course, you could handle periodically truncating your data source columns manually somehow too.
As an aside, there has been interest in developing the "dataframe" qualities of CDS on the JS side, so things like slices could be used to inform glyph renderers. It's just obviously not a trivial task, and no one has been available to work on it yet.
On Jan 6, 2017, at 6:11 AM, [email protected] wrote:
With a periodic callback I update an interactive plot.
The whole graph squeezes to accomodate all the data.
How is it possibile to visualize the last, say, 10000 points without removing the old ones from data_source?
It is just a visualization property that I cannot find anywhere and I am (almost) sure it is hidden between the lines...
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/78f9a665-3c06-448a-906e-16b9c2b19eb8%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.