For some reason if I set manually ticks on spectrogram, they are not drawn correctly. If you check on the first graph below it is in descending order from top to bottom (8000, 6000, 4000, ...), while on second graph where I set ticks manually it is in ascending order (this gives wrong values of frequencies). Reversing the ticks list does not solve the issue.
What I think that happens is that frame is showing ticks relative to top, while spectrogram frequencies are drawn relative to bottom. Any ideas on how to solve this?