From c0b17bf64070007c23a3e05b53332750233f40fd Mon Sep 17 00:00:00 2001 From: mfe Date: Fri, 24 Jan 2014 17:38:07 +0100 Subject: [PATCH] Add chroma plotting test --- test/chroma_test.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/chroma_test.py diff --git a/test/chroma_test.py b/test/chroma_test.py new file mode 100644 index 0000000..3729488 --- /dev/null +++ b/test/chroma_test.py @@ -0,0 +1,32 @@ +""" Chroma plot Testing + +""" +import unittest +import matplotlib.pyplot as plt +from utils import matplotlib_helper as mplh +from utils import colorspaces + + +class Test(unittest.TestCase): + """Test chromaticity plotting + + """ + def test_chroma_plot(self): + """Plot spectrum locus and standard gamut + + """ + plt.xlabel('chromaticity x') + plt.ylabel('chromaticity y') + plt.title("Standard Gamut") + plt.axis([-0.1, 0.8, -0.4, 0.65]) + plt.grid(True) + mplh.plot_spectrum_locus_76() + mplh.plot_colorspace_gamut(colorspaces.ACES, lines_color="c", + upvp_conversion=True) + mplh.plot_colorspace_gamut(colorspaces.REC709, lines_color="m", + upvp_conversion=True) + plt.legend(loc=4) + plt.show() + +if __name__ == "__main__": + unittest.main()