I need to perform something in bokeh which I am successfully doing in matplotlib.
I plot contour plots using matplotlib along with a colorbar on the side using contourf function. I do not use the meshgrid fuction because I already have X, Y and Z data in (78, 60001) shape arrays each. So this is what works:
array1[0].shape
(78, 60001)
array1[1].shape
(78, 60001)
array1[2].shape
(78, 60001)
CS = plt.contourf(array1[0], array1[1], array1[2], 25, cmap = plt.cm.jet)
Which gives the following results:
How do I do the same thing in bokeh? Most of the examples on the internet and manual are using meshgrid.
===
Update #1: Example: https://docs.bokeh.org/en/latest/docs/gallery/image.html
I tried the above bokeh code as follows:
p.image(array1[2], array1[0], array1[1], dw=10, dh=10, palette="Spectral11")
Which gives the following error:
RuntimeError: Columns need to be 1D (x is not)
===
Update #2:
p.image(array1[2].ravel(), array1[0].ravel(), array1[1].ravel(), dw=10, dh=None, palette="Spectral11")
Above line of code creates the HTML file but no plot is displayed.