diff generate_cmaps.py @ 0:cf608e2b1436 draft

planemo upload for repository https://github.com/esg-epfl-apc/tools-astro/tree/main/tools/astropytools commit 1ed262b482599b257c6b323b154bee2412265dbf-dirty
author astroteam
date Thu, 22 Jun 2023 19:38:45 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/generate_cmaps.py	Thu Jun 22 19:38:45 2023 +0000
@@ -0,0 +1,5 @@
+from matplotlib import pyplot as plt
+
+cmaps = sorted(m for m in plt.cm.datad if not m.endswith("_r"))
+
+print("\n".join([f'<option value="{cm}">{cm}</option>' for cm in cmaps]))