def single_illuminant_relative_spd_plot( illuminant='A', cmfs='CIE 1931 2 Degree Standard Observer', **kwargs): """ Plots given single illuminant relative spectral power distribution. Parameters ---------- illuminant : unicode, optional Factory illuminant to plot. cmfs : unicode, optional Standard observer colour matching functions to plot. \**kwargs : dict, optional Keywords arguments. Returns ------- Figure Current figure or None. Examples -------- >>> single_illuminant_relative_spd_plot() # doctest: +SKIP """ cmfs = get_cmfs(cmfs) title = 'Illuminant {0} - {1}'.format(illuminant, cmfs.title) illuminant = get_illuminant(illuminant) settings = {'title': title, 'y_label': 'Relative Power'} settings.update(kwargs) return single_spd_plot(illuminant, **settings)
def multi_illuminants_relative_spd_plot(illuminants=None, **kwargs): """ Plots given illuminants relative spectral power distributions. Parameters ---------- illuminants : array_like, optional Factory illuminants to plot. Other Parameters ---------------- \**kwargs : dict, optional {:func:`boundaries`, :func:`canvas`, :func:`decorate`, :func:`display`}, Please refer to the documentation of the previously listed definitions. use_spds_colours : bool, optional {:func:`multi_spd_plot`} Whether to use spectral power distributions colours. normalise_spds_colours : bool {:func:`multi_spd_plot`} Whether to normalise spectral power distributions colours. Returns ------- Figure Current figure or None. Examples -------- >>> multi_illuminants_relative_spd_plot(['A', 'B', 'C']) # doctest: +SKIP """ if illuminants is None: illuminants = ('A', 'B', 'C') spds = [] for illuminant in illuminants: spds.append(get_illuminant(illuminant)) settings = { 'title': ('{0} - Illuminants Relative Spectral Power Distribution').format( ', '.join([spd.title for spd in spds])), 'y_label': 'Relative Power' } settings.update(kwargs) return multi_spd_plot(spds, **settings)
def single_illuminant_relative_spd_plot( illuminant='A', cmfs='CIE 1931 2 Degree Standard Observer', **kwargs): """ Plots given single illuminant relative spectral power distribution. Parameters ---------- illuminant : unicode, optional Factory illuminant to plot. cmfs : unicode, optional Standard observer colour matching functions to plot. Other Parameters ---------------- \**kwargs : dict, optional {:func:`colour.plotting.render`}, Please refer to the documentation of the previously listed definition. out_of_gamut_clipping : bool, optional {:func:`colour.plotting.single_spd_plot`}, Whether to clip out of gamut colours otherwise, the colours will be offset by the absolute minimal colour leading to a rendering on gray background, less saturated and smoother. Returns ------- Figure Current figure or None. References ---------- - :cite:`Spiker2015a` Examples -------- >>> single_illuminant_relative_spd_plot() # doctest: +SKIP """ cmfs = get_cmfs(cmfs) title = 'Illuminant {0} - {1}'.format(illuminant, cmfs.strict_name) illuminant = get_illuminant(illuminant) settings = {'title': title, 'y_label': 'Relative Power'} settings.update(kwargs) return single_spd_plot(illuminant, **settings)
def multi_illuminants_relative_spd_plot(illuminants=None, **kwargs): """ Plots given illuminants relative spectral power distributions. Parameters ---------- illuminants : array_like, optional Factory illuminants to plot. \**kwargs : dict, optional Keywords arguments. Returns ------- bool Definition success. Examples -------- >>> multi_illuminants_relative_spd_plot(['A', 'B', 'C']) # doctest: +SKIP True """ if illuminants is None: illuminants = ('A', 'B', 'C') spds = [] for illuminant in illuminants: spds.append(get_illuminant(illuminant)) settings = { 'title': ('{0} - Illuminants Relative Spectral Power Distribution').format( ', '.join([spd.title for spd in spds])), 'y_label': 'Relative Spectral Power Distribution' } settings.update(kwargs) return multi_spd_plot(spds, **settings)
def single_illuminant_relative_spd_plot( illuminant='A', cmfs='CIE 1931 2 Degree Standard Observer', **kwargs): """ Plots given single illuminant relative spectral power distribution. Parameters ---------- illuminant : unicode, optional Factory illuminant to plot. cmfs : unicode, optional Standard observer colour matching functions to plot. \**kwargs : dict, optional Keywords arguments. Returns ------- bool Definition success. Examples -------- >>> single_illuminant_relative_spd_plot() # doctest: +SKIP True """ cmfs = get_cmfs(cmfs) title = 'Illuminant {0} - {1}'.format(illuminant, cmfs.title) illuminant = get_illuminant(illuminant) settings = { 'title': title, 'y_label': 'Relative Spectral Power Distribution'} settings.update(kwargs) return single_spd_plot(illuminant, **settings)
def multi_illuminants_relative_spd_plot(illuminants=None, **kwargs): """ Plots given illuminants relative spectral power distributions. Parameters ---------- illuminants : array_like, optional Factory illuminants to plot. \**kwargs : dict, optional Keywords arguments. Returns ------- bool Definition success. Examples -------- >>> multi_illuminants_relative_spd_plot(['A', 'B', 'C']) # doctest: +SKIP True """ if illuminants is None: illuminants = ('A', 'B', 'C') spds = [] for illuminant in illuminants: spds.append(get_illuminant(illuminant)) settings = { 'title': ( '{0} - Illuminants Relative Spectral Power Distribution').format( ', '.join([spd.title for spd in spds])), 'y_label': 'Relative Spectral Power Distribution'} settings.update(kwargs) return multi_spd_plot(spds, **settings)