Max number of points in a scatter plot

Hi,

what is the max number of points bokeh can handle in a scatter plot?

in the example below I was able to display up to 500k points with webgl=True

any suggestion?

thanks.

···

Angelo Fausti Neto
LIneA/LSST

Hi,

Maybe you could try to split your data in two arrays and then represent both in the same plot, maybe that way the JS will not break

Bests,

Gabi

···

On Thursday, October 1, 2015 at 3:45:36 AM UTC+2, Angelo Fausti Neto wrote:

Hi,

what is the max number of points bokeh can handle in a scatter plot?

in the example below I was able to display up to 500k points with webgl=True

any suggestion?

thanks.

=====================

scatter_plot.py:

import pandas as pd
from bokeh.plotting import output_file, figure, show

output_file(“scatter_plot.html”, title=“Scatter Plot”)

data=pd.read_csv(“data.csv”, usecols=[‘x’, ‘y’], nrows=600000)

plot=figure(webgl=True)
plot.scatter(data[‘x’],data[‘y’], alpha=0.1)
show(plot)

=====================

From firebug console:

Bokeh: Realizing plot:

scatter_plot.html (line 187)

Bokeh: - modeltype: PlotContext

scatter_plot.html (line 187)

Bokeh: - modelid: f1d66615-45fc-46af-ab92-a589d550bf5a

scatter_plot.html (line 187)

Bokeh: - elementid: a6b1a3eb-6f76-4501-9b10-fa6c93ade1d4

scatter_plot.html (line 187)

RangeError: arguments array passed to Function.prototype.apply is too large

...is[e]=i.array(t),this["max_"+e]=Math.max.apply(null,this[e]);l=this.fields;for(e...

Angelo Fausti Neto
LIneA/LSST

Hi,

···

On Thu, Oct 1, 2015 at 3:45 AM, Angelo Fausti Neto [email protected] wrote:

Hi,

what is the max number of points bokeh can handle in a scatter plot?

in the example below I was able to display up to 500k points with webgl=True

any suggestion?

With or without webgl, the number of points should be limited by the available memory. However, currently this was limited by the size of the call stack of a web browser. I removed this limitation in https://github.com/bokeh/bokeh/pull/2932. This fix should be available in bokeh 0.11.

Mateusz

thanks.

=====================

scatter_plot.py:

import pandas as pd
from bokeh.plotting import output_file, figure, show

output_file(“scatter_plot.html”, title=“Scatter Plot”)

data=pd.read_csv(“data.csv”, usecols=[‘x’, ‘y’], nrows=600000)

plot=figure(webgl=True)
plot.scatter(data[‘x’],data[‘y’], alpha=0.1)
show(plot)

=====================

From firebug console:

Bokeh: Realizing plot:

scatter_plot.html (line 187)

Bokeh: - modeltype: PlotContext

scatter_plot.html (line 187)

Bokeh: - modelid: f1d66615-45fc-46af-ab92-a589d550bf5a

scatter_plot.html (line 187)

Bokeh: - elementid: a6b1a3eb-6f76-4501-9b10-fa6c93ade1d4

scatter_plot.html (line 187)

RangeError: arguments array passed to Function.prototype.apply is too large

...is[e]=i.array(t),this["max_"+e]=Math.max.apply(null,this[e]);l=this.fields;for(e...

Angelo Fausti Neto
LIneA/LSST

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/CAD%3DOK5M5%3DafpscRhMB50-6GgRje24a7RsvcgMb7CwB55aO8knw%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Mateusz,

that’s great thank you! Looking forward for the 0.11 release.

···

On Thu, Oct 1, 2015 at 1:59 AM, Mateusz Paprocki [email protected] wrote:

Hi,

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/CANFzp8ib8Z_HrshGHs%2Bj%3DC_voThMHK9g3teo1NX8qLFzbWhm%3DA%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Angelo Fausti Neto

LIneA/LSST

On Thu, Oct 1, 2015 at 3:45 AM, Angelo Fausti Neto [email protected] wrote:

Hi,

what is the max number of points bokeh can handle in a scatter plot?

in the example below I was able to display up to 500k points with webgl=True

any suggestion?

With or without webgl, the number of points should be limited by the available memory. However, currently this was limited by the size of the call stack of a web browser. I removed this limitation in https://github.com/bokeh/bokeh/pull/2932. This fix should be available in bokeh 0.11.

Mateusz

thanks.

=====================

scatter_plot.py:

import pandas as pd
from bokeh.plotting import output_file, figure, show

output_file(“scatter_plot.html”, title=“Scatter Plot”)

data=pd.read_csv(“data.csv”, usecols=[‘x’, ‘y’], nrows=600000)

plot=figure(webgl=True)
plot.scatter(data[‘x’],data[‘y’], alpha=0.1)
show(plot)

=====================

From firebug console:

Bokeh: Realizing plot:

scatter_plot.html (line 187)

Bokeh: - modeltype: PlotContext

scatter_plot.html (line 187)

Bokeh: - modelid: f1d66615-45fc-46af-ab92-a589d550bf5a

scatter_plot.html (line 187)

Bokeh: - elementid: a6b1a3eb-6f76-4501-9b10-fa6c93ade1d4

scatter_plot.html (line 187)

RangeError: arguments array passed to Function.prototype.apply is too large

...is[e]=i.array(t),this["max_"+e]=Math.max.apply(null,this[e]);l=this.fields;for(e...

Angelo Fausti Neto
LIneA/LSST

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/CAD%3DOK5M5%3DafpscRhMB50-6GgRje24a7RsvcgMb7CwB55aO8knw%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.