Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- import matplotlib.pyplot as plt
- def cie1931(L):
- L = L*100.0
- if L <= 8:
- return (L/902.3)
- else:
- return ((L+16.0)/116.0)**3
- x = [ w / 100 for w in range(-100, 100) ]
- cie = [ cie1931(abs(h)) for h in x]
- x2 = [ h**2 for h in x ]
- fig, ax = plt.subplots()
- ax.plot(x, cie, lw=2, label="cie1931")
- ax.plot(x, x2, lw=2, label = "squared")
- plt.legend(loc=0)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment