# 
#         osloS
#                   www.fabiocrameri.ch/colourmaps
from matplotlib.colors import LinearSegmentedColormap      
      
cm_data = [[0.011981, 0.022573, 0.035904],      
           [0.9755, 0.97627, 0.97736],      
           [0.30552, 0.47648, 0.73395],      
           [0.62419, 0.68501, 0.78985],      
           [0.085598, 0.22609, 0.36313],      
           [0.47934, 0.59453, 0.79049],      
           [0.78818, 0.80419, 0.83221],      
           [0.15079, 0.34023, 0.55062],      
           [0.055777, 0.12209, 0.1914],      
           [0.39773, 0.54152, 0.77911],      
           [0.87832, 0.88353, 0.89257],      
           [0.21074, 0.40122, 0.64454],      
           [0.11283, 0.28431, 0.45849],      
           [0.5492, 0.638, 0.79001],      
           [0.066906, 0.1702, 0.27186],      
           [0.045051, 0.079044, 0.11765],      
           [0.70433, 0.73922, 0.79993],      
           [0.92695, 0.92933, 0.93336],      
           [0.58637, 0.66109, 0.7894],      
           [0.66327, 0.71065, 0.79272],      
           [0.44025, 0.56961, 0.78769],      
           [0.097979, 0.25504, 0.41039],      
           [0.25504, 0.438, 0.69265],      
           [0.075341, 0.1977, 0.31691],      
           [0.17526, 0.36759, 0.59439],      
           [0.027247, 0.052453, 0.080952],      
           [0.51216, 0.61504, 0.79069],      
           [0.060281, 0.14391, 0.22826],      
           [0.35647, 0.51314, 0.76358],      
           [0.74795, 0.77185, 0.81362],      
           [0.13107, 0.31389, 0.50733],      
           [0.82985, 0.8398, 0.85717],      
           [0.051698, 0.098921, 0.15108],      
           [0.037057, 0.066553, 0.09953],      
           [0.5307, 0.62654, 0.7904],      
           [0.95123, 0.9527, 0.95509],      
           [0.063381, 0.15688, 0.24986],      
           [0.053612, 0.11032, 0.17099],      
           [0.72581, 0.75497, 0.80584],      
           [0.1214, 0.29907, 0.48282],      
           [0.070924, 0.18381, 0.29422],      
           [0.68351, 0.72448, 0.79564],      
           [0.091564, 0.24048, 0.38663],      
           [0.85402, 0.86133, 0.87406],      
           [0.10497, 0.26965, 0.43433],      
           [0.27982, 0.45722, 0.7145],      
           [0.4601, 0.58235, 0.78958],      
           [0.56773, 0.64949, 0.78964],      
           [0.60516, 0.6729, 0.78942],      
           [0.41955, 0.55607, 0.78438],      
           [0.23185, 0.41923, 0.6691],      
           [0.080255, 0.21181, 0.33989],      
           [0.90265, 0.90624, 0.91243],      
           [0.33129, 0.49527, 0.7504],      
           [0.19189, 0.38402, 0.61953],      
           [0.64352, 0.69754, 0.79087],      
           [0.018294, 0.035927, 0.058123],      
           [0.77073, 0.7899, 0.82345],      
           [0.4982, 0.60634, 0.79076],      
           [0.049035, 0.087853, 0.13174],      
           [0.16413, 0.3557, 0.57558],      
           [0.81186, 0.82418, 0.84572],      
           [0.058136, 0.13444, 0.2123],      
           [0.38054, 0.52984, 0.77355],      
           [0.14184, 0.32887, 0.532],      
           [0.041492, 0.072993, 0.10848],      
           [0.10879, 0.27697, 0.44639],      
           [0.53994, 0.63227, 0.79021],      
           [0.31844, 0.48596, 0.74258],      
           [0.9391, 0.94098, 0.94414],      
           [0.63382, 0.69121, 0.79027],      
           [0.40879, 0.54895, 0.78202],      
           [0.10138, 0.26232, 0.42232],      
           [0.088529, 0.23325, 0.37486],      
           [0.79997, 0.81406, 0.8387],      
           [0.24318, 0.42853, 0.68103],      
           [0.69384, 0.73173, 0.79759],      
           [0.054655, 0.11618, 0.18112],      
           [0.75926, 0.78073, 0.81827],      
           [0.031984, 0.059842, 0.090619],      
           [0.84192, 0.85047, 0.8654],      
           [0.86617, 0.87236, 0.88313],      
           [0.29259, 0.46688, 0.72457],      
           [0.061699, 0.15035, 0.23901],      
           [0.073118, 0.19072, 0.30554],      
           [0.55845, 0.64373, 0.78981],      
           [0.67332, 0.71747, 0.79403],      
           [0.050671, 0.093388, 0.14135],      
           [0.59574, 0.66696, 0.78937],      
           [0.91481, 0.91775, 0.92278],      
           [0.13625, 0.32135, 0.51964],      
           [0.45027, 0.57608, 0.78879],      
           [0.12613, 0.30647, 0.49506],      
           [0.077709, 0.20473, 0.32836],      
           [0.61464, 0.67891, 0.78957],      
           [0.52144, 0.62081, 0.79057],      
           [0.094704, 0.24776, 0.39848],      
           [0.36866, 0.52164, 0.76895],      
           [0.20102, 0.39251, 0.63207],      
           [0.052632, 0.10451, 0.16098]]      
      
osloS_map = LinearSegmentedColormap.from_list('osloS', cm_data)      
# For use of "viscm view"      
test_cm = osloS_map      
      
if __name__ == "__main__":      
    import matplotlib.pyplot as plt      
    import numpy as np      
      
    try:      
        from viscm import viscm      
        viscm(osloS_map)      
    except ImportError:      
        print("viscm not found, falling back on simple display")      
        plt.imshow(np.linspace(0, 100, 256)[None, :], aspect='auto',      
                   cmap=osloS_map)      
    plt.show()      
