• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

colour-science / colour / 18370061804

09 Oct 2025 08:19AM UTC coverage: 76.753% (-22.6%) from 99.349%
18370061804

push

github

KelSolaar
Merge branch 'feature/v0.4.7' into develop

32663 of 42556 relevant lines covered (76.75%)

0.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/colour/plotting/__init__.py
1
from colour.utilities import is_matplotlib_installed
×
2

3
if not is_matplotlib_installed():  # pragma: no cover
4
    import sys
5
    from unittest.mock import MagicMock
6

7
    from colour.utilities import usage_warning
8

9
    try:
10
        is_matplotlib_installed(raise_exception=True)
11
    except ImportError as error:
12
        usage_warning(str(error))
13

14
    for module in (
15
        "cycler",
16
        "matplotlib",
17
        "matplotlib.axes",
18
        "matplotlib.cm",
19
        "matplotlib.collections",
20
        "matplotlib.colors",
21
        "matplotlib.figure",
22
        "matplotlib.font_manager",
23
        "matplotlib.patches",
24
        "matplotlib.path",
25
        "matplotlib.pyplot",
26
        "matplotlib.ticker",
27
        "mpl_toolkits",
28
        "mpl_toolkits.mplot3d",
29
        "mpl_toolkits.mplot3d.art3d",
30
        "mpl_toolkits.mplot3d.axes3d",
31
    ):
32
        sys.modules[module] = MagicMock()
33

34
from . import datasets
×
35
from .datasets import *  # noqa: F403
×
36

37
# isort: split
38

39
from .common import (
40
    CONSTANTS_ARROW_STYLE,
41
    CONSTANTS_COLOUR_STYLE,
42
    ColourSwatch,
43
    XYZ_to_plotting_colourspace,
44
    artist,
45
    camera,
46
    colour_cycle,
47
    colour_style,
48
    filter_cmfs,
49
    filter_colour_checkers,
50
    filter_illuminants,
51
    filter_passthrough,
52
    filter_RGB_colourspaces,
53
    font_scaling,
54
    label_rectangles,
55
    override_style,
56
    plot_image,
57
    plot_multi_colour_swatches,
58
    plot_multi_functions,
59
    plot_single_colour_swatch,
60
    plot_single_function,
61
    render,
62
    uniform_axes3d,
63
    update_settings_collection,
64
)
65

66
# isort: split
67

68
from .blindness import plot_cvd_simulation_Machado2009
×
69
from .characterisation import (
×
70
    plot_multi_colour_checkers,
71
    plot_single_colour_checker,
72
)
73
from .colorimetry import (
×
74
    plot_blackbody_colours,
75
    plot_blackbody_spectral_radiance,
76
    plot_multi_cmfs,
77
    plot_multi_illuminant_sds,
78
    plot_multi_lightness_functions,
79
    plot_multi_luminance_functions,
80
    plot_multi_sds,
81
    plot_single_cmfs,
82
    plot_single_illuminant_sd,
83
    plot_single_lightness_function,
84
    plot_single_luminance_function,
85
    plot_single_sd,
86
    plot_visible_spectrum,
87
)
88
from .diagrams import (
×
89
    LABELS_CHROMATICITY_DIAGRAM_DEFAULT,
90
    METHODS_CHROMATICITY_DIAGRAM,
91
    lines_spectral_locus,
92
    plot_chromaticity_diagram_CIE1931,
93
    plot_chromaticity_diagram_CIE1960UCS,
94
    plot_chromaticity_diagram_CIE1976UCS,
95
    plot_sds_in_chromaticity_diagram_CIE1931,
96
    plot_sds_in_chromaticity_diagram_CIE1960UCS,
97
    plot_sds_in_chromaticity_diagram_CIE1976UCS,
98
)
99

100
# isort: split
101

102
from .corresponding import (  # noqa: RUF100
×
103
    plot_corresponding_chromaticities_prediction,
104
)
105
from .graph import plot_automatic_colour_conversion_graph
×
106
from .models import (
×
107
    colourspace_model_axis_reorder,
108
    lines_pointer_gamut,
109
    plot_constant_hue_loci,
110
    plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931,
111
    plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS,
112
    plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS,
113
    plot_multi_cctfs,
114
    plot_pointer_gamut,
115
    plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931,
116
    plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS,
117
    plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS,
118
    plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931,
119
    plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS,
120
    plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS,
121
    plot_single_cctf,
122
)
123
from .notation import (
×
124
    plot_multi_munsell_value_functions,
125
    plot_single_munsell_value_function,
126
)
127
from .phenomena import (
×
128
    plot_single_sd_rayleigh_scattering,
129
    plot_the_blue_sky,
130
)
131
from .quality import (
×
132
    plot_multi_sds_colour_quality_scales_bars,
133
    plot_multi_sds_colour_rendering_indexes_bars,
134
    plot_single_sd_colour_quality_scale_bars,
135
    plot_single_sd_colour_rendering_index_bars,
136
)
137
from .section import (
×
138
    plot_RGB_colourspace_section,
139
    plot_visible_spectrum_section,
140
)
141
from .temperature import (
×
142
    LABELS_PLANCKIAN_LOCUS_DEFAULT,
143
    lines_daylight_locus,
144
    lines_planckian_locus,
145
    plot_planckian_locus_in_chromaticity_diagram_CIE1931,
146
    plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS,
147
    plot_planckian_locus_in_chromaticity_diagram_CIE1976UCS,
148
)
149
from .tm3018 import plot_single_sd_colour_rendition_report
×
150
from .volume import (  # noqa: RUF100
×
151
    plot_RGB_colourspaces_gamuts,
152
    plot_RGB_scatter,
153
)
154

155
__all__ = datasets.__all__
×
156
__all__ += [
157
    "CONSTANTS_ARROW_STYLE",
158
    "CONSTANTS_COLOUR_STYLE",
159
    "ColourSwatch",
160
    "XYZ_to_plotting_colourspace",
161
    "artist",
162
    "camera",
163
    "colour_cycle",
164
    "colour_style",
165
    "filter_cmfs",
166
    "filter_colour_checkers",
167
    "filter_illuminants",
168
    "filter_passthrough",
169
    "filter_RGB_colourspaces",
170
    "font_scaling",
171
    "label_rectangles",
172
    "override_style",
173
    "plot_image",
174
    "plot_multi_colour_swatches",
175
    "plot_multi_functions",
176
    "plot_single_colour_swatch",
177
    "plot_single_function",
178
    "render",
179
    "uniform_axes3d",
180
    "update_settings_collection",
181
]
182
__all__ += [
×
183
    "plot_cvd_simulation_Machado2009",
184
]
185
__all__ += [
×
186
    "plot_multi_colour_checkers",
187
    "plot_single_colour_checker",
188
]
189
__all__ += [
×
190
    "plot_blackbody_colours",
191
    "plot_blackbody_spectral_radiance",
192
    "plot_multi_cmfs",
193
    "plot_multi_illuminant_sds",
194
    "plot_multi_lightness_functions",
195
    "plot_multi_luminance_functions",
196
    "plot_multi_sds",
197
    "plot_single_cmfs",
198
    "plot_single_illuminant_sd",
199
    "plot_single_lightness_function",
200
    "plot_single_luminance_function",
201
    "plot_single_sd",
202
    "plot_visible_spectrum",
203
]
204
__all__ += [
×
205
    "LABELS_CHROMATICITY_DIAGRAM_DEFAULT",
206
    "METHODS_CHROMATICITY_DIAGRAM",
207
    "lines_spectral_locus",
208
    "plot_chromaticity_diagram_CIE1931",
209
    "plot_chromaticity_diagram_CIE1960UCS",
210
    "plot_chromaticity_diagram_CIE1976UCS",
211
    "plot_sds_in_chromaticity_diagram_CIE1931",
212
    "plot_sds_in_chromaticity_diagram_CIE1960UCS",
213
    "plot_sds_in_chromaticity_diagram_CIE1976UCS",
214
]
215
__all__ += [
×
216
    "plot_corresponding_chromaticities_prediction",
217
]
218
__all__ += [
×
219
    "plot_automatic_colour_conversion_graph",
220
]
221
__all__ += [
×
222
    "colourspace_model_axis_reorder",
223
    "lines_pointer_gamut",
224
    "plot_constant_hue_loci",
225
    "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931",
226
    "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS",
227
    "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS",
228
    "plot_multi_cctfs",
229
    "plot_pointer_gamut",
230
    "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931",
231
    "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS",
232
    "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS",
233
    "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931",
234
    "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS",
235
    "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS",
236
    "plot_single_cctf",
237
]
238
__all__ += [
×
239
    "plot_multi_munsell_value_functions",
240
    "plot_single_munsell_value_function",
241
]
242
__all__ += [
×
243
    "plot_single_sd_rayleigh_scattering",
244
    "plot_the_blue_sky",
245
]
246
__all__ += [
×
247
    "plot_multi_sds_colour_quality_scales_bars",
248
    "plot_multi_sds_colour_rendering_indexes_bars",
249
    "plot_single_sd_colour_quality_scale_bars",
250
    "plot_single_sd_colour_rendering_index_bars",
251
]
252
__all__ += [
×
253
    "plot_RGB_colourspace_section",
254
    "plot_visible_spectrum_section",
255
]
256
__all__ += [
×
257
    "LABELS_PLANCKIAN_LOCUS_DEFAULT",
258
    "lines_daylight_locus",
259
    "lines_planckian_locus",
260
    "plot_planckian_locus_in_chromaticity_diagram_CIE1931",
261
    "plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS",
262
    "plot_planckian_locus_in_chromaticity_diagram_CIE1976UCS",
263
]
264
__all__ += [
×
265
    "plot_single_sd_colour_rendition_report",
266
]
267
__all__ += [
×
268
    "plot_RGB_colourspaces_gamuts",
269
    "plot_RGB_scatter",
270
]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc