colour-science / colour

Colour Science for Python
https://www.colour-science.org
BSD 3-Clause "New" or "Revised" License
2.1k stars 260 forks source link

[BUG]: Planckian locus CCT curves come out of plot #1234

Closed LaughingMaann closed 6 months ago

LaughingMaann commented 9 months ago

Description

The right diagram is what I used to be able to plot:

image

But the left is now what is being generated. Notice how the CCT wheel depicting the planckian locus in cie 1931 chromaticity diagram comes out of the gammut. How to fix this and make the cct wheel contained in the chromaticity diagram like shown on right?

Code for Reproduction

import matplotlib.pyplot as plt
import colour
from colour.plotting import *
colour_style()

greens = {'red': (0.6977837, 0.30199),
 'green': (0.18129, 0.73702),
 'blue': (0.128963, 0.07417),
 'white': (0.31352, 0.32363)}

(blah1,blah2)=plot_planckian_locus_in_chromaticity_diagram_CIE1931(greens)

Exception Message

/Users/esterpark/anaconda3/lib/python3.11/site-packages/colour/utilities/verbose.py:262: ColourUsageWarning: The "CIE 2012 2 Degree Standard Observer" has been renamed to "CIE 2015 2 Degree Standard Observer" for consistency with the official CIE name which was adopted in 2015.
  warn(*args, **kwargs)  # noqa: B028
/Users/esterpark/anaconda3/lib/python3.11/site-packages/colour/utilities/verbose.py:262: ColourUsageWarning: The "CIE 2012 10 Degree Standard Observer" has been renamed to "CIE 2015 10 Degree Standard Observer" for consistency with the official CIE name which was adopted in 2015.
  warn(*args, **kwargs)  # noqa: B028
/Users/esterpark/anaconda3/lib/python3.11/site-packages/colour/plotting/common.py:690: UserWarning: The figure layout has changed to tight
  figure.tight_layout()
/Users/esterpark/anaconda3/lib/python3.11/site-packages/colour/plotting/common.py:690: UserWarning: The figure layout has changed to tight
  figure.tight_layout()

Environment Information

Name: matplotlib
Version: 3.8.0

python 3.11
KelSolaar commented 9 months ago

Hello @LaughingMaann,

So the diagram on the left is actually correct and the iso-temperature lines represent the limits of where the concept of correlated colour temperature applies. Put another way, we fixed an issue by making them longer! That being said, there is a keyword argument that you can pass to reduce their size: planckian_locus_iso_temperature_lines_D_uv=0.05.

Let us know how it goes!

Cheers,

Thomas

KelSolaar commented 6 months ago

Closing this one!