summaryrefslogtreecommitdiff
path: root/src/cmf_xyz_v_lms.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmf_xyz_v_lms.py')
-rw-r--r--src/cmf_xyz_v_lms.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cmf_xyz_v_lms.py b/src/cmf_xyz_v_lms.py
new file mode 100644
index 0000000..d05211c
--- /dev/null
+++ b/src/cmf_xyz_v_lms.py
@@ -0,0 +1,33 @@
+from shared import *
+import crl, crl.tables as tab
+import matplotlib.pyplot as plt
+
+plot_setup(width=0.7)
+
+fig, axes = plt.subplots(2, sharex=True, sharey=False, gridspec_kw={'hspace': 0})
+
+for i, name in enumerate(["l", "m", "s"]):
+ axes[0].plot(tab.cmf_lms[:, 0], tab.cmf_lms[:, 1 + i], \
+ ["r", "g", "b"][i], \
+ label=("$\\overline{%s}(\\lambda)$" % name))
+
+for i, name in enumerate(["x", "y", "z"]):
+ axes[1].plot(tab.cmf[:, 0], tab.cmf[:, 1 + i], \
+ ["r", "g", "b"][i], \
+ label=("$\\overline{%s}(\\lambda)$" % name))
+
+for i, name in enumerate(["x", "y", "z"]):
+ axes[1].plot(tab.cmf_1964[:, 0], tab.cmf_1964[:, 1 + i], \
+ ["r:", "g:", "b:"][i], \
+ label=("$\\overline{%s}_{10}(\\lambda)$" % name))
+
+for ax in axes:
+ plot_grid(ax)
+ ax.label_outer()
+ ax.set_xlim([380, 780])
+
+axes[0].legend()
+axes[1].legend(fontsize="small")
+
+axes[1].set_xlabel("$\lambda$ [nm]")
+plot_export()