I have generated the spectrogram with GNU Radio and want to save the output graph but have no idea how to do it.
The "QT GUI Frequency Sink" block will display the frequency domain representation of a signal. You can save a static image of the spectrum by accessing the control panel using center-click and choosing "Save".