Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a size restriction when plotting with Bokeh?

Im struggling to create charts when using a large amount of data. Is there a size limitation on data?

For scatter, is there a maximum number of scatter points that can be plotted in one figure? Simillarly, for Histogram is there a maximum number of observations that can be passed?

thanks

like image 308
bs123 Avatar asked Oct 26 '25 19:10

bs123


1 Answers

UPDATE: It's possible this was closer to true in 2015 but there are certainly 300k point plots that are displayable with Bokeh. However there are specific situations, e.g. heavy alpha compositing, that might perform quite badly on some browsers relative to others. Some glyphs may be relatively much more expensive too. The best guidance once you are above ~50k items is simply to try a quick plot and see whether it performs to your needs. If not, you might consider using Holoviews+Datashader to generate interactive Bokeh plots a a high level.


The word-of-mouth recommendation is to plot no more than 10k glyphs in a Bokeh plot. This is more an a browser/RAM issue than a Bokeh one, as each glyph is a unique element that is saved in the DOM.

For histograms, I'd think that the limiting factor would be the number of bins that are rendered (and not the number of observations), but I'm less sure of that.

This is a good discussion about element limits in D3, which touches on the same concepts: maximum number of svg elements for the browser in a map

like image 76
Luke Canavan Avatar answered Oct 29 '25 18:10

Luke Canavan