Both have different method for propagation hence we cant draw the same graph to represent both of them in tems of distance and density which is shown in the above answer.
All waves have frequency, wavelength, speed and amplitude ,so we can draw graphs with these quantities which may resemble each other for transverse and longitudinal waves.