Hi
It is not a matter of which funtion to use, it is a matter of how you generate the values to plot. A plot is a collection of points, therefore, you need to generate these points inorder to get whichever plot,
It seems to me, that your plot is signal spectrum against time-domain signal, I mean it is the same signal, but I am not sure, anyway, I think you can start generate the time domain signal which is plotted in the y axis, divide the data into intervals then apply short fourier transform to any ot these intervals and plot them. there are many concepts about how to determine the size of the interval and the overlapped intervals, but they may not be relevant for you.
Another option I see is to employ the wavelet transform , yo indeed get the time-frequency characteirstics but it doesnt look like your plot.
Sal