I have successfully displayed my numpy data to matplotlib with gradient colors, but in the matplotlib the color gradient appears horizontally, how to make the gradient visible vertically?
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
c = np.arange(1,200)
x = np.arange(1,200)
y = np.random.randint(low=1, high=100, size=200)
cm = plt.get_cmap('jet')
fig = plt.figure(figsize=(10,5))
ax1 = plt.subplot(111)
no_points = len(c)
ax1.set_color_cycle([cm(1.*i/(no_points-1)) for i in range(no_points-1)])
for i in range(no_points-1):
bar = ax1.plot(x[i:i+2],y[i:i+2])
plt.show()
The result is the following:

Instead, I'd like to have a vertical color gradient.
