Search code examples
pythoncolors

Two figures in one plot


I'm trying to plot two figures from colour.plotting in one plot. I know there's a show-Parameter so I tried to show only second figure but it won't work:

import colour

colour.plotting.plot_planckian_locus_in_chromaticity_diagram_CIE1931(["A", "B", "C"],show=False);
colour.plotting.plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931(["ITU-R BT.709", "ITU-R BT.2020"],show=True)

Solution

  • I need to combine them via the axes:

    import colour
    import matplotlib.pyplot as plt
    
    figure, axes = colour.plotting.plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931(["ITU-R BT.709", "ITU-R BT.2020"], show=False)
    colour.plotting.temperature.plot_planckian_locus(axes=axes, show=True)
    
    plt.show()
    

    Thanks to @KelSolaar on GitHub!

    https://github.com/colour-science/colour/discussions/1253