How do I create a frequency vs time plot?
The time vs frequency resolution is a well-known problem, and there are indeed approaches to overcome it. For audio signals, some of the commonly used techniques include: parametric methods ; adaptive resolution (analyze with various time/frequency configurations and patch the results together - Wen X. and M. Sandler, "Composite spectrogram using multiple fourier transforms") ; wavelets/decompositions on overcomplete bases ; and use of phase information to extract the precise location of frequency peaks (IFgram).

However, it appears that the graph you have shown does not use some of these techniques ; so I suspect this is not what you might be looking for. There appears to be some "smearing" on the horizontal axis (for example at t=1.2s) and this is a sure sign that the analysis has been done with a high overlap between chunks.

Indeed, the chunk duration and the number of analysis frames per second do not have to be linked to each other if you allow frames to overlap. So if you want to use 40ms long analysis frame, your grid does not have to be:

frame 1: t=0..t=40ms ; frame 2: t=40ms..t=80ms

It could very well be:

frame 1: t=0..t=40ms ; frame 2: t=10ms..t=50ms

This overlapping can give the illusion of a higher temporal resolution without reducing too much the FFT window size. Note that this can only help in accurately locating an event on the time axis - it will not help resolving two events close in time... Just like increasing the FFT size might help with identifying the location of a frequency peak, but not with the resolution of two adjacent frequency peaks.