If you are in Windows, go to the plot display pane of your signal in LTspice. At the top center, there is a nice "net" name there (could be more than one.) Right click on that and a dialog box will pop up. In the bottom half of that dialog box, is an area with a heading that says "Enter an algebraic expression to plot:". Underneath, you will see the equation used, currently. This is probably just a node name, for now. Move your cursor into the box, left click once to get your text cursor, and move around until you are at the end of the node name. Append "-1" to it. (Or some other value.) This will subtract "1" from the signal. (You said the offset is one, so this subtracts that from the signal." Now just click on the "OKAY" button in the upper right. The display will change. Or, if it doesn't seem to, just right click on the data curve itself and click on "Zoom to Fit." That should get it, if it didn't do so otherwise.
This is beyond the capablities of circuit simulators. The simulators handle only finite length signal bursts. You will not get the same spectrum, because the signal in your example is the theoretical sinewave which has never started and will never stop. It has existed unchanged from t = -eternity and will go on to t = +eternity. It has infinite energy, so it occurs as Dirac's impulses in the Fourier transform.
Simulators calculate the discrete fourier transform. It's said FFT due the used high-speed calculation algorithm. It shows the signal as it were combined from sinewaves which have frequencies 0, 1/T, 2/T, 3/T...Fsample/2 where T is the simulation period and Fsample is the used sample rate.
If your sample rate in the simulation happens to be an integral part of the cycle length of the sinewave and the simulation time period happens to be an integral multiple of the cycle length and no automatic smooth windowing spoils the start and end, then you get something that resembles your theoretical spectrum. It will not be strictly 2 spikes. The numeric rounding errors occur as a noise floor (=extra frequency components) in the spectrum. The energy of the spectrum only will be not infite, but the total energy of the sinewave in the simulation period.
Unfortunately I have not LTspice and do not know, how to order the right Fourier transform mode (=rectangular windowing, show positive and negative frequencies and the phase angles).
Best Answer
Sure, you can use the idt function, for example with a behavioral voltage source, we see the integral wrt time of a sine wave with an offset.