Is there a way to plot lines over a datashader plot in Bokeh (Python)?

197 Views Asked by At

I am working with relatively large datasets (approximately 10x20.000.000 data point), for which Datashader is a useful visualisation tool. To give more information in these visualisations, I would like to add lines showing averages/standarddeviations on top of this datashade figure. Does anyone know how this would be possible?

My current code:

from bokeh.plotting import figure
from bokeh.io import show

x = 'xcol'
y= 'ycol'
data = dataframe

fig = figure(x_axis_label=x, y_axis_label=y)
points = hv.Points(data[[x, y]], label=('Title'))
hd.datashade(points, cmap='crest')

What I would like to do is for example add the following line to the figure generated with the code above:

fig.line([1,10,20], [0, 1000,2000], line_width=4)

Thanks in advance.

0

There are 0 best solutions below