def plot_xyY_color_space(name='ITU-R BT.2020', samples=1024, antialiasing=True):
    '\n    SONY の HDR説明資料にあるような xyY の図を作る。\n\n    Parameters\n    ----------\n    name : str\n        name of the target color space.\n\n    Returns\n    -------\n    None\n\n    '
    (primary_xy, _) = get_primaries(name=name)
    triangulation = Delaunay(primary_xy)
    (xx, yy) = np.meshgrid(np.linspace(0, 1, samples), np.linspace(1, 0, samples))
    xy = np.dstack((xx, yy))
    mask = (triangulation.find_simplex(xy) < 0).astype(np.float)
    if antialiasing:
        kernel = np.array([[0, 1, 0], [1, 2, 1], [0, 1, 0]]).astype(np.float)
        kernel /= np.sum(kernel)
        mask = convolve(mask, kernel)
    mask = (1 - mask[:, :, np.newaxis])
    illuminant_XYZ = D65_WHITE
    illuminant_RGB = RGB_COLOURSPACES[name].whitepoint
    chromatic_adaptation_transform = 'CAT02'
    large_xyz_to_rgb_matrix = get_xyz_to_rgb_matrix(name)
    rgb_to_large_xyz_matrix = get_rgb_to_xyz_matrix(name)
    large_xyz = xy_to_XYZ(xy)
    rgb = XYZ_to_RGB(large_xyz, illuminant_XYZ, illuminant_RGB, large_xyz_to_rgb_matrix, chromatic_adaptation_transform)
    '\n    そのままだとビデオレベルが低かったりするので、\n    各ドット毎にRGB値を正規化＆最大化する。\n    '
    rgb_org = normalise_maximum(rgb, axis=(- 1))
    mask_rgb = np.dstack((mask, mask, mask))
    rgb = (rgb_org * mask_rgb)
    rgba = np.dstack((rgb, mask))
    large_xyz2 = RGB_to_XYZ(rgb, illuminant_RGB, illuminant_XYZ, rgb_to_large_xyz_matrix, chromatic_adaptation_transform)
    large_y = (large_xyz2[(..., 1)] * 1000)
    large_y[(large_y < 1)] = 1.0
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')
    ax.plot_surface(xy[(..., 0)], xy[(..., 1)], np.log10(large_y), rcount=64, ccount=64, facecolors=rgb_org)
    ax.set_xlabel('x')
    ax.set_ylabel('y')
    ax.set_zlabel('Y')
    ax.set_zticks([0, 1, 2, 3])
    ax.set_zticklabels([1, 10, 100, 1000])
    cie1931_rgb = get_chromaticity_image(samples=samples, bg_color=0.0)
    alpha = np.zeros_like(cie1931_rgb[(..., 0)])
    rgb_sum = np.sum(cie1931_rgb, axis=(- 1))
    alpha[(rgb_sum > 1e-05)] = 1
    cie1931_rgb = np.dstack((cie1931_rgb[(..., 0)], cie1931_rgb[(..., 1)], cie1931_rgb[(..., 2)], alpha))
    zz = np.zeros_like(xy[(..., 0)])
    ax.plot_surface(xy[(..., 0)], xy[(..., 1)], zz, facecolors=cie1931_rgb)
    plt.show()
SONY の HDR説明資料にあるような xyY の図を作る。

Parameters
----------
name : str
    name of the target color space.

Returns
-------
None
def plot_xyY_color_space(name='ITU-R BT.2020', samples=1024, antialiasing=True):
    '\n    SONY の HDR説明資料にあるような xyY の図を作る。\n\n    Parameters\n    ----------\n    name : str\n        name of the target color space.\n\n    Returns\n    -------\n    None\n\n    '
    (primary_xy, _) = get_primaries(name=name)
    triangulation = Delaunay(primary_xy)
    (xx, yy) = np.meshgrid(np.linspace(0, 1, samples), np.linspace(1, 0, samples))
    xy = np.dstack((xx, yy))
    mask = (triangulation.find_simplex(xy) < 0).astype(np.float)
    if antialiasing:
        kernel = np.array([[0, 1, 0], [1, 2, 1], [0, 1, 0]]).astype(np.float)
        kernel /= np.sum(kernel)
        mask = convolve(mask, kernel)
    mask = (1 - mask[:, :, np.newaxis])
    illuminant_XYZ = D65_WHITE
    illuminant_RGB = RGB_COLOURSPACES[name].whitepoint
    chromatic_adaptation_transform = 'CAT02'
    large_xyz_to_rgb_matrix = get_xyz_to_rgb_matrix(name)
    rgb_to_large_xyz_matrix = get_rgb_to_xyz_matrix(name)
    large_xyz = xy_to_XYZ(xy)
    rgb = XYZ_to_RGB(large_xyz, illuminant_XYZ, illuminant_RGB, large_xyz_to_rgb_matrix, chromatic_adaptation_transform)
    '\n    そのままだとビデオレベルが低かったりするので、\n    各ドット毎にRGB値を正規化＆最大化する。\n    '
    rgb_org = normalise_maximum(rgb, axis=(- 1))
    mask_rgb = np.dstack((mask, mask, mask))
    rgb = (rgb_org * mask_rgb)
    rgba = np.dstack((rgb, mask))
    large_xyz2 = RGB_to_XYZ(rgb, illuminant_RGB, illuminant_XYZ, rgb_to_large_xyz_matrix, chromatic_adaptation_transform)
    large_y = (large_xyz2[(..., 1)] * 1000)
    large_y[(large_y < 1)] = 1.0
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')
    ax.plot_surface(xy[(..., 0)], xy[(..., 1)], np.log10(large_y), rcount=64, ccount=64, facecolors=rgb_org)
    ax.set_xlabel('x')
    ax.set_ylabel('y')
    ax.set_zlabel('Y')
    ax.set_zticks([0, 1, 2, 3])
    ax.set_zticklabels([1, 10, 100, 1000])
    cie1931_rgb = get_chromaticity_image(samples=samples, bg_color=0.0)
    alpha = np.zeros_like(cie1931_rgb[(..., 0)])
    rgb_sum = np.sum(cie1931_rgb, axis=(- 1))
    alpha[(rgb_sum > 1e-05)] = 1
    cie1931_rgb = np.dstack((cie1931_rgb[(..., 0)], cie1931_rgb[(..., 1)], cie1931_rgb[(..., 2)], alpha))
    zz = np.zeros_like(xy[(..., 0)])
    ax.plot_surface(xy[(..., 0)], xy[(..., 1)], zz, facecolors=cie1931_rgb)
    plt.show()