☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

limitation of 32768 points?

Community Support
Jason_Sachs
Jason_Sachs

I’m just getting started with bokeh, and I’m noticing there seems to be a limitation of 32768 points, and I don’t know why. Does anyone know where it comes from and how to fix it?

import matplotlib.pyplot as plt

import numpy as np

import bokeh

t = np.arange(0,4.0,0.0001)

plt.plot(t,t**2)

bokeh.mpl.to_bokeh(notebook=True)

if I remove the bokeh line, it shows the parabola from x=0 to 4,

but with the bokeh line, it only shows up from 0 to 3.2768

⌁   Link to post
Mateusz_Paprocki
Mateusz_Paprocki

Hi,

···

On Mon, Dec 15, 2014 at 7:25 PM, Jason Sachs jmsachs@gmail.com wrote:

I’m just getting started with bokeh, and I’m noticing there seems to be a limitation of 32768 points, and I don’t know why. Does anyone know where it comes from and how to fix it?

import matplotlib.pyplot as plt

import numpy as np

import bokeh

t = np.arange(0,4.0,0.0001)

plt.plot(t,t**2)

bokeh.mpl.to_bokeh(notebook=True)

if I remove the bokeh line, it shows the parabola from x=0 to 4,

but with the bokeh line, it only shows up from 0 to 3.2768

What browser do you use? I can reproduce this in Chrome 34. This looks like an implementation imposed limit on the length of a path. I was able to locally fix this issue by forcing Line renderer to split paths at fixed, sufficiently small intervals.

Mateusz

–

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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7e8b8182-16b5-470c-844c-4a46c1a47496%40continuum.io.

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

⌁   Link to post
Hugo_Shi
Hugo_Shi

it's canvas

···

On 12/15/2014 02:57 PM, Jason Sachs wrote:

I use Chrome.

If it's SVG, I'm a bit surprised about the path length... I tried creating an SVG path element with 1M segments and it did it fine (albeit slow). Here's one with 256K: http://jsfiddle.net/edum0f60/
--
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 bokeh+unsubscribe@continuum.io <mailto:bokeh+unsubscribe@continuum.io>.
To post to this group, send email to bokeh@continuum.io <mailto:bokeh@continuum.io>.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5c17f181-1f36-4688-b0d8-c538b8c30057%40continuum.io <https://groups.google.com/a/continuum.io/d/msgid/bokeh/5c17f181-1f36-4688-b0d8-c538b8c30057%40continuum.io?utm_medium=email&utm_source=footer&gt;\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Bryan
Bryan

I saw Jason S reported this exact same problem on mpld3, which does not use canvas, so I am not so sure.

···

On Dec 15, 2014, at 7:58 PM, Hugo Shi <hugo.r.shi@gmail.com> wrote:

it's canvas

On 12/15/2014 02:57 PM, Jason Sachs wrote:

I use Chrome.

If it's SVG, I'm a bit surprised about the path length... I tried creating an SVG path element with 1M segments and it did it fine (albeit slow). Here's one with 256K: http://jsfiddle.net/edum0f60/
--
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 bokeh+unsubscribe@continuum.io <mailto:bokeh+unsubscribe@continuum.io>.
To post to this group, send email to bokeh@continuum.io <mailto:bokeh@continuum.io>.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5c17f181-1f36-4688-b0d8-c538b8c30057%40continuum.io <https://groups.google.com/a/continuum.io/d/msgid/bokeh/5c17f181-1f36-4688-b0d8-c538b8c30057%40continuum.io?utm_medium=email&utm_source=footer&gt;\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/548F3D75.2020803%40gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Jason_Sachs
Jason_Sachs

Just tried rewriting my test case to use the HTML5 canvas API, it works fine too:

···

On Monday, December 15, 2014 1:01:19 PM UTC-7, Bryan Van de ven wrote:

I saw Jason S reported this exact same problem on mpld3, which does not use canvas, so I am not so sure.

On Dec 15, 2014, at 7:58 PM, Hugo Shi hugo....@gmail.com wrote:

it’s canvas

On 12/15/2014 02:57 PM, Jason Sachs wrote:

I use Chrome.

If it’s SVG, I’m a bit surprised about the path length… I tried creating an SVG path element with 1M segments and it did it fine (albeit slow). Here’s one with 256K: http://jsfiddle.net/edum0f60/

–
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 bokeh+un...@continuum.io mailto:bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io mailto:bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5c17f181-1f36-4688-b0d8-c538b8c30057%40continuum.io <https://groups.google.com/a/continuum.io/d/msgid/bokeh/5c17f181-1f36-4688-b0d8-c538b8c30057%40continuum.io?utm_medium=email&utm_source=footer>.

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

–
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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/548F3D75.2020803%40gmail.com.

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

⌁   Link to post
Jason_Sachs
Jason_Sachs

Could this be a bug in matplotlib? Both this matplotlib → bokeh renderer and the MPLD3 renderer have the same general approach (use matplotlib normally, then call some fancy magic to convert to javascript)

⌁   Link to post
Jason_Sachs
Jason_Sachs

And drawing 40K points in bokeh itself works fine…

import numpy as np

import bokeh.plotting

t = np.arange(0,4.0,0.0001)

fig=bokeh.plotting.figure(plot_width=300, plot_height=300)

fig.line(t,t**2)

bokeh.plotting.show(fig)

···

On Monday, December 15, 2014 1:30:09 PM UTC-7, Jason Sachs wrote:

Could this be a bug in matplotlib? Both this matplotlib → bokeh renderer and the MPLD3 renderer have the same general approach (use matplotlib normally, then call some fancy magic to convert to javascript)

⌁   Link to post
Bryan
Bryan

I got the same (correct) result plotting 160k points (please see Issues · bokeh/bokeh · GitHub) so perhaps this is indeed an MPL issue. However Mateusz reports a real browser problem on Chrome 34, it would be nice to verify that or not. I get a successful plot on Chrome Version 41.0.2243.2 dev (64-bit)

Bryan

···

On Dec 15, 2014, at 8:50 PM, Jason Sachs <jmsachs@gmail.com> wrote:

And drawing 40K points in bokeh itself works fine....

import numpy as np
import bokeh.plotting

t = np.arange(0,4.0,0.0001)
fig=bokeh.plotting.figure(plot_width=300, plot_height=300)
fig.line(t,t**2)
bokeh.plotting.show(fig)

On Monday, December 15, 2014 1:30:09 PM UTC-7, Jason Sachs wrote:
Could this be a bug in matplotlib? Both this matplotlib -> bokeh renderer and the MPLD3 renderer have the same general approach (use matplotlib normally, then call some fancy magic to convert to javascript)

--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/bc2b5759-1a8c-4908-908c-4da597bd2a05%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Jason_Sachs
Jason_Sachs

I’m using Chrome Version 39.0.2171.71 m, on Windows 7 64-bit

···

On Monday, December 15, 2014 2:23:41 PM UTC-7, Bryan Van de ven wrote:

I got the same (correct) result plotting 160k points (please see https://github.com/bokeh/bokeh/issues/1555) so perhaps this is indeed an MPL issue. However Mateusz reports a real browser problem on Chrome 34, it would be nice to verify that or not. I get a successful plot on Chrome Version 41.0.2243.2 dev (64-bit)

Bryan

On Dec 15, 2014, at 8:50 PM, Jason Sachs jms...@gmail.com wrote:

And drawing 40K points in bokeh itself works fine…

import numpy as np

import bokeh.plotting

t = np.arange(0,4.0,0.0001)

fig=bokeh.plotting.figure(plot_width=300, plot_height=300)

fig.line(t,t**2)

bokeh.plotting.show(fig)

On Monday, December 15, 2014 1:30:09 PM UTC-7, Jason Sachs wrote:

Could this be a bug in matplotlib? Both this matplotlib → bokeh renderer and the MPLD3 renderer have the same general approach (use matplotlib normally, then call some fancy magic to convert to javascript)

–
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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/bc2b5759-1a8c-4908-908c-4da597bd2a05%40continuum.io.

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

⌁   Link to post

End of archived discussion · Replies are disabled