colour.plotting.plot_multi_sds¶
- colour.plotting.plot_multi_sds(sds, plot_kwargs=None, **kwargs)[source]¶
Plots given spectral distributions.
- Parameters
sds (array_like or MultiSpectralDistributions) – Spectral distributions or multi-spectral distributions to plot. sds can be a single
colour.MultiSpectralDistributions
class instance, a list ofcolour.MultiSpectralDistributions
class instances or a list ofcolour.SpectralDistribution
class instances.plot_kwargs (dict or array_like, optional) –
Keyword arguments for the
plt.plot()
definition, used to control the style of the plotted spectral distributions.plot_kwargs
can be either a single dictionary applied to all the plotted spectral distributions with same settings or a sequence of dictionaries with different settings for each plotted spectral distributions. The following special keyword arguments can also be used:illuminant : unicode or
colour.SpectralDistribution
, the illuminant used to compute the spectral distributions colours. The default is the illuminant associated with the whitepoint of the default plotting colourspace.illuminant
can be of any type or form supported by thecolour.plotting.filter_cmfs()
definition.cmfs : unicode, the standard observer colour matching functions used for computing the spectral distributions colours.
cmfs
can be of any type or form supported by thecolour.plotting.filter_cmfs()
definition.normalise_sd_colours : bool, whether to normalise the computed spectral distributions colours. The default is True.
use_sd_colours : bool, whether to use the computed spectral distributions colours under the plotting colourspace illuminant. Alternatively, it is possible to use the
plt.plot()
definitioncolor
argument with pre-computed values. The default is True.
**kwargs (dict, optional) – {
colour.plotting.artist()
,colour.plotting.render()
}, Please refer to the documentation of the previously listed definitions.
- Returns
Current figure and axes.
- Return type
Examples
>>> from colour import SpectralDistribution >>> data_1 = { ... 500: 0.004900, ... 510: 0.009300, ... 520: 0.063270, ... 530: 0.165500, ... 540: 0.290400, ... 550: 0.433450, ... 560: 0.594500 ... } >>> data_2 = { ... 500: 0.323000, ... 510: 0.503000, ... 520: 0.710000, ... 530: 0.862000, ... 540: 0.954000, ... 550: 0.994950, ... 560: 0.995000 ... } >>> sd_1 = SpectralDistribution(data_1, name='Custom 1') >>> sd_2 = SpectralDistribution(data_2, name='Custom 2') >>> plot_kwargs = [ ... {'use_sd_colours': True}, ... {'use_sd_colours': True, 'linestyle': 'dashed'}, ... ] >>> plot_multi_sds([sd_1, sd_2], plot_kwargs=plot_kwargs) ... (<Figure size ... with 1 Axes>, <...AxesSubplot...>)