nod3_cm.py 7.41 KB
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guiqwt/__init__.py for details)

"""
Color data and pre-defined cmap objects.

This is a helper for cm.py, originally part of that file.
Separating the data (this file) from cm.py makes both easier
to deal with.

Objects visible in cm.py are the individual cmap objects ('autumn',
etc.) and a dictionary, 'datad', including all of these objects.
"""

# pylint: disable-msg=C0103
# pylint: disable-msg=C0301
# pylint: disable-msg=C0302


_nod3_pem_step_data =  {'red':   [
          (0.000000, 0.196078, 0.196078),
          (0.023529, 0.196078, 0.196078),
          (0.027451, 0.000000, 0.000000),
          (0.184314, 0.000000, 0.000000),
          (0.188235, 0.392157, 0.392157),
          (0.207843, 0.392157, 0.392157),
          (0.211765, 0.470588, 0.470588),
          (0.231373, 0.470588, 0.470588),
          (0.235294, 0.588235, 0.588235),
          (0.254902, 0.588235, 0.588235),
          (0.258824, 0.705882, 0.705882),
          (0.298039, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.341176, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.384314, 1.000000, 1.000000),
          (0.388235, 0.941176, 0.941176),
          (0.470588, 0.941176, 0.941176),
          (0.474510, 1.000000, 1.000000),
          (0.690196, 1.000000, 1.000000),
          (0.694118, 0.784314, 0.784314),
          (0.768627, 0.784314, 0.784314),
          (0.772549, 0.588235, 0.588235),
          (0.925490, 0.588235, 0.588235),
          (0.929412, 0.784314, 0.784314),
          (0.996078, 0.784314, 0.784314),
          (1.000000, 1.000000, 1.000000)],

       'green': [
          (0.000000, 0.000000, 0.000000),
          (0.066667, 0.000000, 0.000000),
          (0.070588, 0.470588, 0.470588),
          (0.090196, 0.470588, 0.470588),
          (0.094118, 0.588235, 0.588235),
          (0.113725, 0.588235, 0.588235),
          (0.117647, 0.705882, 0.705882),
          (0.137255, 0.705882, 0.705882),
          (0.141176, 0.784314, 0.784314),
          (0.160784, 0.784314, 0.784314),
          (0.164706, 0.862745, 0.862745),
          (0.207843, 0.862745, 0.862745),
          (0.211765, 0.705882, 0.705882),
          (0.298039, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.341176, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.384314, 1.000000, 1.000000),
          (0.388235, 0.784314, 0.784314),
          (0.427451, 0.784314, 0.784314),
          (0.431373, 0.666667, 0.666667),
          (0.525490, 0.666667, 0.666667),
          (0.529412, 0.392157, 0.392157),
          (0.580392, 0.392157, 0.392157),
          (0.584314, 0.196078, 0.196078),
          (0.635294, 0.196078, 0.196078),
          (0.639216, 0.000000, 0.000000),
          (0.847059, 0.000000, 0.000000),
          (0.850980, 0.392157, 0.392157),
          (0.925490, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          (0.996078, 0.784314, 0.784314),
          (1.000000, 1.000000, 1.000000)],

       'blue': [
          (0.000000, 0.705882, 0.705882),
          (0.023529, 0.705882, 0.705882),
          (0.027451, 0.870588, 0.870588),
          (0.043137, 0.870588, 0.870588),
          (0.047059, 1.000000, 1.000000),
          (0.066667, 1.000000, 1.000000),
          (0.070588, 0.705882, 0.705882),
          (0.113725, 0.705882, 0.705882),
          (0.117647, 0.588235, 0.588235),
          (0.137255, 0.588235, 0.588235),
          (0.141176, 0.470588, 0.470588),
          (0.160784, 0.470588, 0.470588),
          (0.164706, 0.000000, 0.000000),
          (0.686275, 0.000000, 0.000000),
          (0.690196, 0.588235, 0.588235),
          (0.847059, 0.588235, 0.588235),
          (0.850980, 0.392157, 0.392157),
          (0.925490, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          (0.996078, 0.784314, 0.784314),
          (1.000000, 1.000000, 1.000000)]}


_nod3_pem_data =  {'red':   [
          (0.000000, 0.196078, 0.196078),
          (0.027451, 0.000000, 0.000000),
          (0.188235, 0.392157, 0.392157),
          (0.211765, 0.470588, 0.470588),
          (0.235294, 0.588235, 0.588235),
          (0.258824, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.388235, 0.941176, 0.941176),
          (0.474510, 1.000000, 1.000000),
          (0.694118, 0.784314, 0.784314),
          (0.772549, 0.588235, 0.588235),
          (0.929412, 0.784314, 0.784314),
          (1.000000, 1.000000, 1.000000)],

       'green': [
          (0.000000, 0.000000, 0.000000),
          (0.070588, 0.470588, 0.470588),
          (0.094118, 0.588235, 0.588235),
          (0.117647, 0.705882, 0.705882),
          (0.141176, 0.784314, 0.784314),
          (0.164706, 0.862745, 0.862745),
          (0.211765, 0.705882, 0.705882),
          (0.301961, 0.901961, 0.901961),
          (0.345098, 1.000000, 1.000000),
          (0.388235, 0.784314, 0.784314),
          (0.431373, 0.666667, 0.666667),
          (0.529412, 0.392157, 0.392157),
          (0.584314, 0.196078, 0.196078),
          (0.639216, 0.000000, 0.000000),
          (0.850980, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          (1.000000, 1.000000, 1.000000)],

       'blue': [
          (0.000000, 0.705882, 0.705882),
          (0.027451, 0.870588, 0.870588),
          (0.047059, 1.000000, 1.000000),
          (0.070588, 0.705882, 0.705882),
          (0.117647, 0.588235, 0.588235),
          (0.141176, 0.470588, 0.470588),
          (0.164706, 0.000000, 0.000000),
          (0.690196, 0.588235, 0.588235),
          (0.850980, 0.392157, 0.392157),
          (0.929412, 0.784314, 0.784314),
          (1.000000, 1.000000, 1.000000)]}


_nod3_beck_data =  {'red':   [(0.0, 0.0, 0.0),
                     (0.16862745, 0.0, 0.0),
                     (0.34509804, 1.0, 1.0),
                     (1.00000000, 1.0, 1.0)],

       'green': [(0.0, 0.0, 0.0),
          (0.0431373, 0.0, 0.0),
          (0.15686275, 1.0, 1.0),
          (0.26274510, 1.0, 1.0),
          (0.94117647, 0.0, 0.0),
          (1.0, 0.0, 0.0)],

       'blue': [(0.0, 0.0, 0.0),
          (0.0509804, 1.0, 1.0),
          (0.0745098, 1.0, 1.0),
          (0.18039216, 0.0, 0.0),
          (1.0, 0.0, 0.0)]}


_nod3_rainbow_data =  {'red':   [(0.0,  0.5, 0.4),
                     (1.0/6.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.6,  1.0, 1.0),
                   (1.0,  0.0, 0.0)],

         'blue':  [(0.0,  0.5, 0.5),
                   (1.0/6.0,  1.0, 1.0),
                   (1.0,  0.0, 0.0)]}

_nod3_easy_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (0.5,  1.0, 1.0),
                   (1.0,  0.0, 0.0)],

         'blue':  [(0.0,  1.0, 1.0),
                   (1.0,  0.0, 0.0)]}

_nod3_heat_data =  {'red':   [(0.0,  0.0, 0.0),
                     (1.0/3.0,  1.0, 1.0),
                     (1.0,  1.0, 1.0)],

         'green': [(0.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)],

         'blue':  [(0.0,  0.0, 0.0),
                   (2.0/3.0,  0.0, 0.0),
                   (1.0,  1.0, 1.0)]}

datad = {
    'nod3_easy': _nod3_easy_data,
    'nod3_heat': _nod3_heat_data,
    'nod3_pem': _nod3_pem_data,
    'nod3_pem_step': _nod3_pem_step_data,
    'nod3_beck': _nod3_beck_data
    }