colour.plotting.models.common_colourspace_model_axis_reorder

colour.plotting.models.common_colourspace_model_axis_reorder(a, model=None)[source]

Reorder the axes of given colourspace model \(a\) array according to the most common volume plotting axes order.

Parameters:
  • a (array_like) – Colourspace model \(a\) array.
  • model (unicode, optional) – {‘CIE XYZ’, ‘CIE xyY’, ‘CIE xy’, ‘CIE Lab’, ‘CIE LCHab’, ‘CIE Luv’, ‘CIE Luv uv’, ‘CIE LCHuv’, ‘CIE UCS’, ‘CIE UCS uv’, ‘CIE UVW’, ‘DIN 99’, ‘Hunter Lab’, ‘Hunter Rdab’, ‘IPT’, ‘JzAzBz’, ‘OSA UCS’, ‘hdr-CIELAB’, ‘hdr-IPT’}, Colourspace model.
Returns:

Reordered colourspace model \(a\) array.

Return type:

ndarray

Examples

>>> a = np.array([0, 1, 2])
>>> common_colourspace_model_axis_reorder(a)
array([0, 1, 2])
>>> common_colourspace_model_axis_reorder(a, 'CIE Lab')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'CIE LCHab')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'CIE Luv')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'CIE LCHab')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'DIN 99')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'Hunter Lab')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'Hunter Rdab')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'IPT')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'JzAzBz')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'OSA UCS')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'hdr-CIELAB')
array([ 1.,  2.,  0.])
>>> common_colourspace_model_axis_reorder(a, 'hdr-IPT')
array([ 1.,  2.,  0.])