Hello everyone!
I need to plot points (x, y) from some dataset using different color of points depending on the magnitude of the value in another dataset Z. The dimensions of x, y, z are the same.
In short, how to write the same code using pylab but in Bokeh?
import numpy as np
import pylab as plt
x=[0,1,1,2,2,2,3,3,3,3,4,4,4,5,5,6]
y=[5,3,4,3,4,5,2,3,4,5,3,4,5,3,4,5]
col=[6,6,5,6,5,4,6,5,4,3,6,5,4,6,5,0]
plt.figure(figsize=(10,5))
plt.scatter(x, y, c=col, s=100)
plt.colorbar()
plt.axis('equal')
I tried to find examples of the solution and came across to factor_cmap
and linear_cmap
However could not find a solution that worked for me.
This is necessary in order to find outgoing points on similar datasets (like the one in the screenshot marked with an arrow).