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

Commit

Permalink
Add chroma plotting test
Browse files Browse the repository at this point in the history
  • Loading branch information
mfe committed Jan 24, 2014
1 parent 60c185e commit c0b17bf
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/chroma_test.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit c0b17bf

Please sign in to comment.