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

colour-science / colour / 7236037920

17 Dec 2023 03:18AM UTC coverage: 99.733% (-0.06%) from 99.793%
7236037920

push

github

KelSolaar
Merge branch 'release/v0.4.4'

4935 of 4962 new or added lines in 340 files covered. (99.46%)

1 existing line in 1 file now uncovered.

39946 of 40053 relevant lines covered (99.73%)

1.0 hits per line

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

79.07
/colour/plotting/__init__.py
1
from colour.utilities import is_matplotlib_installed
1✔
2

3
if not is_matplotlib_installed():
1✔
NEW
4
    import sys
×
NEW
5
    from unittest.mock import MagicMock
×
NEW
6
    from colour.utilities import usage_warning
×
7

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

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

33
from .datasets import *  # noqa: F403
1✔
34
from . import datasets
1✔
35
from .common import (
36
    CONSTANTS_COLOUR_STYLE,
37
    CONSTANTS_ARROW_STYLE,
38
    colour_style,
39
    override_style,
40
    font_scaling,
41
    XYZ_to_plotting_colourspace,
42
    ColourSwatch,
43
    colour_cycle,
44
    artist,
45
    camera,
46
    render,
47
    label_rectangles,
48
    uniform_axes3d,
49
    filter_passthrough,
50
    filter_RGB_colourspaces,
51
    filter_cmfs,
52
    filter_illuminants,
53
    filter_colour_checkers,
54
    update_settings_collection,
55
    plot_single_colour_swatch,
56
    plot_multi_colour_swatches,
57
    plot_single_function,
58
    plot_multi_functions,
59
    plot_image,
60
)
61
from .blindness import plot_cvd_simulation_Machado2009
1✔
62
from .colorimetry import (
1✔
63
    plot_single_sd,
64
    plot_multi_sds,
65
    plot_single_cmfs,
66
    plot_multi_cmfs,
67
    plot_single_illuminant_sd,
68
    plot_multi_illuminant_sds,
69
    plot_visible_spectrum,
70
    plot_single_lightness_function,
71
    plot_multi_lightness_functions,
72
    plot_single_luminance_function,
73
    plot_multi_luminance_functions,
74
    plot_blackbody_spectral_radiance,
75
    plot_blackbody_colours,
76
)
77
from .characterisation import (
1✔
78
    plot_single_colour_checker,
79
    plot_multi_colour_checkers,
80
)
81
from .diagrams import (
1✔
82
    METHODS_CHROMATICITY_DIAGRAM,
83
    LABELS_CHROMATICITY_DIAGRAM_DEFAULT,
84
    lines_spectral_locus,
85
    plot_chromaticity_diagram_CIE1931,
86
    plot_chromaticity_diagram_CIE1960UCS,
87
    plot_chromaticity_diagram_CIE1976UCS,
88
    plot_sds_in_chromaticity_diagram_CIE1931,
89
    plot_sds_in_chromaticity_diagram_CIE1960UCS,
90
    plot_sds_in_chromaticity_diagram_CIE1976UCS,
91
)
92
from .corresponding import (
1✔
93
    plot_corresponding_chromaticities_prediction,
94
)  # noqa: RUF100
95
from .graph import plot_automatic_colour_conversion_graph
1✔
96
from .models import (
1✔
97
    colourspace_model_axis_reorder,
98
    lines_pointer_gamut,
99
    plot_pointer_gamut,
100
    plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931,
101
    plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS,
102
    plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS,
103
    plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931,
104
    plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS,
105
    plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS,
106
    plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931,
107
    plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS,
108
    plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS,
109
    plot_single_cctf,
110
    plot_multi_cctfs,
111
    plot_constant_hue_loci,
112
)
113
from .notation import (
1✔
114
    plot_single_munsell_value_function,
115
    plot_multi_munsell_value_functions,
116
)
117
from .phenomena import (
1✔
118
    plot_single_sd_rayleigh_scattering,
119
    plot_the_blue_sky,
120
)
121
from .quality import (
1✔
122
    plot_single_sd_colour_rendering_index_bars,
123
    plot_multi_sds_colour_rendering_indexes_bars,
124
    plot_single_sd_colour_quality_scale_bars,
125
    plot_multi_sds_colour_quality_scales_bars,
126
)
127
from .section import (
1✔
128
    plot_visible_spectrum_section,
129
    plot_RGB_colourspace_section,
130
)
131
from .temperature import (
1✔
132
    lines_daylight_locus,
133
    LABELS_PLANCKIAN_LOCUS_DEFAULT,
134
    lines_planckian_locus,
135
    plot_planckian_locus_in_chromaticity_diagram_CIE1931,
136
    plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS,
137
    plot_planckian_locus_in_chromaticity_diagram_CIE1976UCS,
138
)
139
from .tm3018 import plot_single_sd_colour_rendition_report
1✔
140
from .volume import (
1✔
141
    plot_RGB_colourspaces_gamuts,
142
    plot_RGB_scatter,
143
)  # noqa: RUF100
144

145
__all__ = []
1✔
146
__all__ += datasets.__all__
1✔
147
__all__ += [
148
    "CONSTANTS_COLOUR_STYLE",
149
    "CONSTANTS_ARROW_STYLE",
150
    "colour_style",
151
    "override_style",
152
    "font_scaling",
153
    "XYZ_to_plotting_colourspace",
154
    "ColourSwatch",
155
    "colour_cycle",
156
    "artist",
157
    "camera",
158
    "render",
159
    "label_rectangles",
160
    "uniform_axes3d",
161
    "filter_passthrough",
162
    "filter_RGB_colourspaces",
163
    "filter_cmfs",
164
    "filter_illuminants",
165
    "filter_colour_checkers",
166
    "update_settings_collection",
167
    "plot_single_colour_swatch",
168
    "plot_multi_colour_swatches",
169
    "plot_single_function",
170
    "plot_multi_functions",
171
    "plot_image",
172
]
173
__all__ += [
1✔
174
    "plot_cvd_simulation_Machado2009",
175
]
176
__all__ += [
1✔
177
    "plot_single_sd",
178
    "plot_multi_sds",
179
    "plot_single_cmfs",
180
    "plot_multi_cmfs",
181
    "plot_single_illuminant_sd",
182
    "plot_multi_illuminant_sds",
183
    "plot_visible_spectrum",
184
    "plot_single_lightness_function",
185
    "plot_multi_lightness_functions",
186
    "plot_single_luminance_function",
187
    "plot_multi_luminance_functions",
188
    "plot_blackbody_spectral_radiance",
189
    "plot_blackbody_colours",
190
]
191
__all__ += [
1✔
192
    "plot_single_colour_checker",
193
    "plot_multi_colour_checkers",
194
]
195
__all__ += [
1✔
196
    "METHODS_CHROMATICITY_DIAGRAM",
197
    "LABELS_CHROMATICITY_DIAGRAM_DEFAULT",
198
    "lines_spectral_locus",
199
    "plot_chromaticity_diagram_CIE1931",
200
    "plot_chromaticity_diagram_CIE1960UCS",
201
    "plot_chromaticity_diagram_CIE1976UCS",
202
    "plot_sds_in_chromaticity_diagram_CIE1931",
203
    "plot_sds_in_chromaticity_diagram_CIE1960UCS",
204
    "plot_sds_in_chromaticity_diagram_CIE1976UCS",
205
]
206
__all__ += [
1✔
207
    "plot_corresponding_chromaticities_prediction",
208
]
209
__all__ += [
1✔
210
    "plot_automatic_colour_conversion_graph",
211
]
212
__all__ += [
1✔
213
    "colourspace_model_axis_reorder",
214
    "lines_pointer_gamut",
215
    "plot_pointer_gamut",
216
    "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931",
217
    "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS",
218
    "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS",
219
    "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931",
220
    "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS",
221
    "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS",
222
    "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931",
223
    "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS",
224
    "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS",
225
    "plot_single_cctf",
226
    "plot_multi_cctfs",
227
    "plot_constant_hue_loci",
228
]
229
__all__ += [
1✔
230
    "plot_single_munsell_value_function",
231
    "plot_multi_munsell_value_functions",
232
]
233
__all__ += [
1✔
234
    "plot_single_sd_rayleigh_scattering",
235
    "plot_the_blue_sky",
236
]
237
__all__ += [
1✔
238
    "plot_single_sd_colour_rendering_index_bars",
239
    "plot_multi_sds_colour_rendering_indexes_bars",
240
    "plot_single_sd_colour_quality_scale_bars",
241
    "plot_multi_sds_colour_quality_scales_bars",
242
]
243
__all__ += [
1✔
244
    "plot_visible_spectrum_section",
245
    "plot_RGB_colourspace_section",
246
]
247
__all__ += [
1✔
248
    "lines_daylight_locus",
249
    "LABELS_PLANCKIAN_LOCUS_DEFAULT",
250
    "lines_planckian_locus",
251
    "plot_planckian_locus_in_chromaticity_diagram_CIE1931",
252
    "plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS",
253
    "plot_planckian_locus_in_chromaticity_diagram_CIE1976UCS",
254
]
255
__all__ += [
1✔
256
    "plot_single_sd_colour_rendition_report",
257
]
258
__all__ += [
1✔
259
    "plot_RGB_colourspaces_gamuts",
260
    "plot_RGB_scatter",
261
]
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