Just as the title says, is there a way to make a 2D plot using matplotlib.pyplot
? something like the following snippet:
import numpy as np
imprt matplotlib.pyplot as mp
t = np.linspace(0,200,200)
x = np.array([ np.cos(i/(6.28)) for i in range(-100,100)])
y = np.array([ np.sin(i/(6.28)) for i in range(-100,100)])
mp.plot(x,y, color=SOME_WAY_TO_VARY_COLOR_WITH_T(t))
mp.show()
The goal is to have the output plot to change colors with respect to t, or normalized from 0 to 1 where something like blue would be 0 and red would be 1.
Any help would be appreciated!