I am trying to make a plot of some photoluminescence data, where wavelength is on the x-axis, and intensity is on the y-axis. Also, I would like to have the graph boxed, with the upper x-axis having units of energy in eV, connected to the wavelength through the function: energy=1240/wavelength.
I have tried to use the TickLabelFunction
in the LevelScheme package, and have only partly succeeded. I can't control the number of decimal points for the ticks on the energy scale. For some reason, N[]
doesn't work.
Also, the energy tickmarks seem to follow the wavelength ticks, i.e. one energy tick for each wavelength tick. I would like those ticks to be spaced nonlinearly and independently of the other axis, e.g. having them increase with steps of 0.2 eV.
Here is a small code that I hope will illustrate my problem.
test = List[{500, 50}];
ListPlot[test, Frame -> True, ImageSize -> 600,
PlotRange -> {{400, 800}, {-10, 110}},
FrameLabel -> {"Wavelength (nm)", "Intensity (a.u.)", "Energy (eV)"},
FrameTicks -> {LinTicks[400, 800, 100, 5], LinTicks,
LinTicks[400, 800, 100, 5,
TickLabelFunction -> Function[x, N[1240/x, 2]]],
StripTickLabels[LinTicks]}]
Any input appreciated, either using the LevelScheme package or not. Thanks!