1import matplotlib as mpl
2import matplotlib.pyplot as plt
3
4def plot_colorMaps(cmap):
5
6 fig, ax = plt.subplots(figsize=(4,0.4))
7 col_map = plt.get_cmap(cmap)
8 mpl.colorbar.ColorbarBase(ax, cmap=col_map, orientation = 'horizontal')
9
10 plt.show()
11
12for cmap_id in plt.colormaps():
13 print(cmap_id)
14 plot_colorMaps(cmap_id)