Plot a signal colored by it points importance

Viewed 11

I want to plot a signal and highlight each point based on its importance. For example: I have the following signal

x = np.arange(0, 5, 0.1)
y = np.sin(x)

and I have another array assigning the importance of each point in the signal.

n = np.random.uniform(low=0.5, high=13.3, size=(50,))

Is there any way that I can plot y and the hue is based on n? y and n have the same shape which is 50

0 Answers
Related