Coverage for plotting/__init__.py: 0%

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_ray,

60 plot_single_colour_swatch,

61 plot_single_function,

62 render,

63 uniform_axes3d,

64 update_settings_collection,

65)

66

67# isort: split

68

69 from .blindness import plot_cvd_simulation_Machado2009

70 from .characterisation import (

71 plot_multi_colour_checkers,

72 plot_single_colour_checker,

73)

74 from .colorimetry import (

75 plot_blackbody_colours,

76 plot_blackbody_spectral_radiance,

77 plot_multi_cmfs,

78 plot_multi_illuminant_sds,

79 plot_multi_lightness_functions,

80 plot_multi_luminance_functions,

81 plot_multi_sds,

82 plot_single_cmfs,

83 plot_single_illuminant_sd,

84 plot_single_lightness_function,

85 plot_single_luminance_function,

86 plot_single_sd,

87 plot_visible_spectrum,

88)

89 from .diagrams import (

90 LABELS_CHROMATICITY_DIAGRAM_DEFAULT,

91 METHODS_CHROMATICITY_DIAGRAM,

92 lines_spectral_locus,

93 plot_chromaticity_diagram_CIE1931,

94 plot_chromaticity_diagram_CIE1960UCS,

95 plot_chromaticity_diagram_CIE1976UCS,

96 plot_sds_in_chromaticity_diagram_CIE1931,

97 plot_sds_in_chromaticity_diagram_CIE1960UCS,

98 plot_sds_in_chromaticity_diagram_CIE1976UCS,

99)

100

101# isort: split

102

103 from .corresponding import ( # noqa: RUF100

104 plot_corresponding_chromaticities_prediction,

105)

106 from .graph import plot_automatic_colour_conversion_graph

107 from .models import (

108 colourspace_model_axis_reorder,

109 lines_pointer_gamut,

110 plot_constant_hue_loci,

111 plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931,

112 plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS,

113 plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS,

114 plot_multi_cctfs,

115 plot_pointer_gamut,

116 plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931,

117 plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS,

118 plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS,

119 plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931,

120 plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS,

121 plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS,

122 plot_single_cctf,

123)

124 from .notation import (

125 plot_multi_munsell_value_functions,

126 plot_single_munsell_value_function,

127)

128 from .phenomena import (

129 plot_multi_layer_stack,

130 plot_multi_layer_thin_film,

131 plot_single_layer_thin_film,

132 plot_single_sd_rayleigh_scattering,

133 plot_the_blue_sky,

134 plot_thin_film_comparison,

135 plot_thin_film_iridescence,

136 plot_thin_film_reflectance_map,

137 plot_thin_film_spectrum,

138)

139 from .quality import (

140 plot_multi_sds_colour_quality_scales_bars,

141 plot_multi_sds_colour_rendering_indexes_bars,

142 plot_single_sd_colour_quality_scale_bars,

143 plot_single_sd_colour_rendering_index_bars,

144)

145 from .section import (

146 plot_RGB_colourspace_section,

147 plot_visible_spectrum_section,

148)

149 from .temperature import (

150 LABELS_PLANCKIAN_LOCUS_DEFAULT,

151 lines_daylight_locus,

152 lines_planckian_locus,

153 plot_planckian_locus_in_chromaticity_diagram_CIE1931,

154 plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS,

155 plot_planckian_locus_in_chromaticity_diagram_CIE1976UCS,

156)

157 from .tm3018 import plot_single_sd_colour_rendition_report

158 from .volume import ( # noqa: RUF100

159 plot_RGB_colourspaces_gamuts,

160 plot_RGB_scatter,

161)

162

163 __all__ = datasets.__all__

164 __all__ += [

165 "CONSTANTS_ARROW_STYLE",

166 "CONSTANTS_COLOUR_STYLE",

167 "ColourSwatch",

168 "XYZ_to_plotting_colourspace",

169 "artist",

170 "camera",

171 "colour_cycle",

172 "colour_style",

173 "filter_cmfs",

174 "filter_colour_checkers",

175 "filter_illuminants",

176 "filter_passthrough",

177 "filter_RGB_colourspaces",

178 "font_scaling",

179 "label_rectangles",

180 "override_style",

181 "plot_image",

182 "plot_multi_colour_swatches",

183 "plot_multi_functions",

184 "plot_ray",

185 "plot_single_colour_swatch",

186 "plot_single_function",

187 "render",

188 "uniform_axes3d",

189 "update_settings_collection",

190]

191 __all__ += [

192 "plot_cvd_simulation_Machado2009",

193]

194 __all__ += [

195 "plot_multi_colour_checkers",

196 "plot_single_colour_checker",

197]

198 __all__ += [

199 "plot_blackbody_colours",

200 "plot_blackbody_spectral_radiance",

201 "plot_multi_cmfs",

202 "plot_multi_illuminant_sds",

203 "plot_multi_lightness_functions",

204 "plot_multi_luminance_functions",

205 "plot_multi_sds",

206 "plot_single_cmfs",

207 "plot_single_illuminant_sd",

208 "plot_single_lightness_function",

209 "plot_single_luminance_function",

210 "plot_single_sd",

211 "plot_visible_spectrum",

212]

213 __all__ += [

214 "LABELS_CHROMATICITY_DIAGRAM_DEFAULT",

215 "METHODS_CHROMATICITY_DIAGRAM",

216 "lines_spectral_locus",

217 "plot_chromaticity_diagram_CIE1931",

218 "plot_chromaticity_diagram_CIE1960UCS",

219 "plot_chromaticity_diagram_CIE1976UCS",

220 "plot_sds_in_chromaticity_diagram_CIE1931",

221 "plot_sds_in_chromaticity_diagram_CIE1960UCS",

222 "plot_sds_in_chromaticity_diagram_CIE1976UCS",

223]

224 __all__ += [

225 "plot_corresponding_chromaticities_prediction",

226]

227 __all__ += [

228 "plot_automatic_colour_conversion_graph",

229]

230 __all__ += [

231 "colourspace_model_axis_reorder",

232 "lines_pointer_gamut",

233 "plot_constant_hue_loci",

234 "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1931",

235 "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1960UCS",

236 "plot_ellipses_MacAdam1942_in_chromaticity_diagram_CIE1976UCS",

237 "plot_multi_cctfs",

238 "plot_pointer_gamut",

239 "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1931",

240 "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1960UCS",

241 "plot_RGB_chromaticities_in_chromaticity_diagram_CIE1976UCS",

242 "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1931",

243 "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1960UCS",

244 "plot_RGB_colourspaces_in_chromaticity_diagram_CIE1976UCS",

245 "plot_single_cctf",

246]

247 __all__ += [

248 "plot_multi_munsell_value_functions",

249 "plot_single_munsell_value_function",

250]

251 __all__ += [

252 "plot_single_sd_rayleigh_scattering",

253 "plot_the_blue_sky",

254 "plot_single_layer_thin_film",

255 "plot_multi_layer_thin_film",

256 "plot_thin_film_comparison",

257 "plot_thin_film_spectrum",

258 "plot_thin_film_iridescence",

259 "plot_thin_film_reflectance_map",

260 "plot_multi_layer_stack",

261]

262 __all__ += [

263 "plot_multi_sds_colour_quality_scales_bars",

264 "plot_multi_sds_colour_rendering_indexes_bars",

265 "plot_single_sd_colour_quality_scale_bars",

266 "plot_single_sd_colour_rendering_index_bars",

267]

268 __all__ += [

269 "plot_RGB_colourspace_section",

270 "plot_visible_spectrum_section",

271]

272 __all__ += [

273 "LABELS_PLANCKIAN_LOCUS_DEFAULT",

274 "lines_daylight_locus",

275 "lines_planckian_locus",

276 "plot_planckian_locus_in_chromaticity_diagram_CIE1931",

277 "plot_planckian_locus_in_chromaticity_diagram_CIE1960UCS",

278 "plot_planckian_locus_in_chromaticity_diagram_CIE1976UCS",

279]

280 __all__ += [

281 "plot_single_sd_colour_rendition_report",

282]

283 __all__ += [

284 "plot_RGB_colourspaces_gamuts",

285 "plot_RGB_scatter",

286]