Plotting a frequency marker on the SpectrumAnalyserTutorial

#1

Question regarding SpectrumAnalyserTutorial, source file here.

I’d like to plot a vertical line on the FFT plot at a particular frequency (or bin#). How do I map that frequency to the 512-point x axis? The formula is eluding me.

TLDR: it’s a 2048 point FFT mapping onto a 512-point logarithmic x-axis.

Thanks!