I am new to Bokeh. I have tried to run the following code on JupyterLab with Python 3.8 and Bokeh 2.1.1, but it’s extremely slow and totally un-usable.
import numpy as np import matplotlib.pyplot as plt from bokeh.plotting import figure, show from bokeh.models import PrintfTickFormatter p = figure(plot_width=1920, plot_height=1080, output_backend="webgl", tools='xpan,box_zoom,zoom_in,zoom_out,undo,reset') y = np.random.random(size=(12, 2000000)) x = np.arange(y.shape) for n, line in enumerate(y): p.line(x, line + n * 2, legend_label=str(n)) p.xaxis.formatter = PrintfTickFormatter(format="%d") p.legend.location = "top_left" p.legend.click_policy = "hide" show(p)
My PC has i7-9700k, 48GB DDR4, 1TB NVME SSD, RTX2070 Super GPU + Win10 Pro.
I was told Bokeh was designed to crunch large data, I guess I must be doing it wrong. What else can I do to speed this up? Please advice.