ich habe aktuell ein recht ausgefallenes Problem. Ich habe ein Diagram in welchem auf der x-Achse die Wellenlänge (~Farbe) des Lichts aufgetragen ist. Die gezeichnete Kurve soll nun die Farbe entsprechend der aktuellen Wellenlänge annehmen, wie etwa hier.
Damit es möglichst korrekt bleibt wollte ich als Farbmodell das "wave" nutzen, das aus einer Wellenläge direkt eine Farbausgabe erzeugt. Ich weiß aber nicht wie ich dies hinbekomme da ich schon an der normalen Zuweiung scheitere
Hat das schon mal jemand gemacht? Anbei mein Minimalbeispiel
\documentclass{scrreprt} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{xcolor} \begin{document} \colorbox[wave]{400}{UV 400 nm}\\ \colorbox[wave]{450}{blau 450 nm}\\ \colorbox[wave]{525}{grün 525 nm}\\ \colorbox[wave]{650}{rot 650 nm}\\ \colorbox[wave]{750}{N-IR 750 nm}\\ \colorbox[wave]{814}{IR 814 nm}\\ \begin{tikzpicture} \begin{axis}[ xmin = 400, xmax = 850, xlabel = {Wellenlänge $ \lambda $ in nm} ] \addplot [red, ultra thick] coordinates { (400,100) (850,650) }; %\addplot [color=[wave]{525}] coordinates { (400,100) (850,600) }; % not working %\addplot [color={[wave]{450}}] coordinates { (400,100) (850,550) }; % not working \end{axis} \end{tikzpicture} \end{document}