Skip to content
This repository was archived by the owner on Nov 22, 2019. It is now read-only.

Commit c0b17bf

Browse files
author
mfe
committed
Add chroma plotting test
1 parent 60c185e commit c0b17bf

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/chroma_test.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
""" Chroma plot Testing
2+
3+
"""
4+
import unittest
5+
import matplotlib.pyplot as plt
6+
from utils import matplotlib_helper as mplh
7+
from utils import colorspaces
8+
9+
10+
class Test(unittest.TestCase):
11+
"""Test chromaticity plotting
12+
13+
"""
14+
def test_chroma_plot(self):
15+
"""Plot spectrum locus and standard gamut
16+
17+
"""
18+
plt.xlabel('chromaticity x')
19+
plt.ylabel('chromaticity y')
20+
plt.title("Standard Gamut")
21+
plt.axis([-0.1, 0.8, -0.4, 0.65])
22+
plt.grid(True)
23+
mplh.plot_spectrum_locus_76()
24+
mplh.plot_colorspace_gamut(colorspaces.ACES, lines_color="c",
25+
upvp_conversion=True)
26+
mplh.plot_colorspace_gamut(colorspaces.REC709, lines_color="m",
27+
upvp_conversion=True)
28+
plt.legend(loc=4)
29+
plt.show()
30+
31+
if __name__ == "__main__":
32+
unittest.main()

0 commit comments

Comments
 (0)