2

How do I print a chromaticity diagram (Ideally a CIE 1931 plot) with certain coordinates on it labelled.

Something like this (made with non-LaTeX software I don't have access to until after the Christmas break and would have to go into campus to use, which is strongly discouraged if not absolutely needed due to the pandemic).

A CIE 1931 diagram with point labelled A and 1-5

What I have found so far: This question lead me to the pst-cie package, which looks like a very easy way to draw the diagram, but its documentation doesn't explain how to label specific points. It has examples of adding a curve to it, but I need points rather then a curve, and its documentation is...very barebones to the point I'm not sure how to do anything but recreate the examples in the pdf.

There is also this TikZ answer but I don't know TikZ so I'd have no idea how to start adapting it to my needs. (I know a little bit of pgfplots which is why I was very hopeful about pst-cie, but it appears to use a totally different syntax style.

Also, none of the answers are in pdflatex which is what I'm currently using, though I guess if I had to I could move to XeLaTeX or LuaLaTeX.

Note: I will take "there is currently no easy or good way to do this in LaTeX" as a valid answer, I have a GNUplot script that can do the same thing if need be, it would just be nice to do everything inside LaTeX.

5
  • 1
    I've just been told that calling GNUplot from within TikZ is possible, which seems a way to do this!
    – Canageek
    Dec 23, 2020 at 22:14
  • Could you post the pstricks code you've tried?
    – Bernard
    Dec 23, 2020 at 22:30
  • @Bernard I haven't tried yet, I just looked over the examples and couldn't see how to start. Right now I'm trying using an existing GNUplot script written by a former grad student within TikZ and if I get it working I'll answer my own question.
    – Canageek
    Dec 23, 2020 at 22:40
  • What are the specific points you'd like to label? Is it A, 3,4,5 as shown in the posted image?
    – Bernard
    Dec 23, 2020 at 22:53
  • @Bernard I'm going to be specifying those based on data that I don't have yet, but those work for an initial test. The labels will be more like "Eu" "Tb" etc.
    – Canageek
    Dec 24, 2020 at 0:24

1 Answer 1

3

This is just for fun but it appears that already the color wheel yields something that is not too dissimilar. This suggests that if you derive the contour instead of just approximating it by a parabola you might have something that can be used till you get to your lab to produce the "real thing".

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{shadings}
\begin{document}
\begin{tikzpicture}[declare function={alpha=270;s=3;
    a=0.8;b=0.5;c=1.6;R=max(sqrt(a*a+b*b),c);}]
 \begin{scope}  
  \clip[rotate=30] (-a*s,-b*s) parabola bend (0,c*s) (a*s,-b*s);
  \shade[shading=color wheel,transform canvas={rotate=alpha,xscale=-1}] 
    (0,0) circle[radius=R*s];
 \end{scope}    
 \draw[rotate=30] (-a*s,-b*s) parabola bend (0,c*s) (a*s,-b*s);
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .