summaryrefslogtreecommitdiff
path: root/src/pasek_tecza.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pasek_tecza.py')
-rw-r--r--src/pasek_tecza.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pasek_tecza.py b/src/pasek_tecza.py
new file mode 100644
index 0000000..f831503
--- /dev/null
+++ b/src/pasek_tecza.py
@@ -0,0 +1,14 @@
+from shared import *
+import crl, numpy as np, matplotlib.pyplot as plt
+
+wvls = np.linspace(380, 780, 200)
+colors = []
+for wvl in wvls:
+ x, y, Y = crl.xyY(crl.PointSpectrum(wvl))
+ colors.append([*crl.sRGB(crl.xyY(x, y, Y / 2))])
+colors = np.array(colors)
+
+plot_setup()
+plot_colorbar(wvls, colors)
+plt.xlabel("$\\lambda~[\\mathrm{nm}]$")
+plot_export() \ No newline at end of file