I want to produce the following plot:
Is a Lorentzian function, centered at x=408. But notice the upper label in the frame, that indicates a wave number associated to the coordinate measured in pixels (the bottom label).
I came across a few questions regarding plotting two x axes in pgfplots. (For example here and here), but they all are concerned about plotting two functions or curves on the same plot, and labeling them differently. I have only one function that I want to label twice.
What I have at the moment is this:
\documentclass{standalone}
\usepackage{pgfplots,tikz}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis} [
xlabel={CCD coordinate [px]},
ylabel={Intensity [A.U]},
xmin=0,xmax=1000,
ymajorgrids=true,
xmajorgrids=true,
]
\addplot[line width=1pt,samples=500,domain=0:1000]{4.278*10^(7)/((x-408.4)^2+54.25^2)};
\end{axis}
\end{tikzpicture}
\end{document}
I want the upper label to consist the following markers, written in the form
{{x1,label1},{x2,label2}, ... }
{80.15,639.892},{244.225,648.096},{408.3,656.3},{572.375,664.504},{736.45,672.708},{900.525,680.911}
What option should I add to my code to make it?


axisand state correspondingxticks and correspondingxticklabels. But there is room for a bit of improvement to your answer. Since this would be a bit too long for a comment, I posted it as separate answer. Please have a look if you find some useful stuff there. If you would adapt these stuff in your answer, I'll be happy to delete mine. – Stefan Pinnow Apr 14 '21 at 05:08