Think about an impulse that occurs only on t = 1s. When you plot this in time domain, you only get a single line over the t = 1s mark. You wouldn't extend this signal since it is confined to t = 1s.
Similarly for a signal that has only a singular frequency, you do not expand it in the frequency domain. It appears as a single line over the frequency it has.
If a signal is made up of different harmonics, then there are different amplitudes for different frequencies; the amplitudes indicate which frequencies are more dominating ones in the signal.
But the last graph you drew simply implies that the signal is composed of an infinite number of frequencies, all of which have an amplitude of 5. It doesn't represent the cosine function at all.