|
@@ -14,6 +14,7 @@ def save_color_gradient(cmap_name='jet', width=512, height=50, filename=None):
|
|
|
gradient = np.linspace(0, 1, width).reshape(1, -1)
|
|
gradient = np.linspace(0, 1, width).reshape(1, -1)
|
|
|
gradient = np.repeat(gradient, height, axis=0)
|
|
gradient = np.repeat(gradient, height, axis=0)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
plt.figure(figsize=(8, 1.5))
|
|
plt.figure(figsize=(8, 1.5))
|
|
|
plt.imshow(gradient, aspect='auto', cmap=cmap)
|
|
plt.imshow(gradient, aspect='auto', cmap=cmap)
|
|
|
plt.title(f"Color Gradient (colormap = '{cmap_name}')")
|
|
plt.title(f"Color Gradient (colormap = '{cmap_name}')")
|