x = np.linspace(0, 2 * pi, 100)
r = [(sin(1 * i) + 1) / 2 for i in x]
g = [(sin(2 * i) + 1) / 2 for i in x]
b = [(sin(3 * i) + 1) / 2 for i in x]
bgr = list(zip(b, g, r))
hsv = np.array([bgr_to_hsv(a) for a in bgr])
plt.figure(figsize=(16, 8))
plt.subplot(121)
plt.plot(x, r, color='r')
plt.plot(x, g, color='g')
plt.plot(x, b, color='b')
plt.legend(('r', 'g', 'b'))
plt.subplot(122)
plt.plot(x, hsv[:, 0], linewidth=3)
plt.plot(x, hsv[:, 1], linestyle=':')
plt.plot(x, hsv[:, 2], linestyle=':')
plt.legend(('hue', 'sat', 'val'))
plt.show()