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
On Mon, Dec 15, 2014 at 7:25 PM, Jason Sachs [email protected] 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 [email protected].
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: Edit fiddle - JSFiddle - Code Playground
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.
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)
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)
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)
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)
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)
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 [email protected].