A graph should clarify the relationship between two quantities, requiring the least amount of mental effort on the part of your audience.
If you are trying to show the change of density as a function of position along a wave, you should plot position along one axis, and density along the other. Whether you use vertical deflection as a measure of density or dots that are closer together or further apart is a choice you can make: if you want to give people an intuitive sense of "further apart", then the dots are a good choice; if you want to show "sinusoidally varying density profile", then the line graph would be better.
While an oscilloscope normally has a horizontal time axis, it is actually possible with most scopes to plot "anything you want" along the X axis, using something called the XY mode of the scope. Thus, you don't have to plot time (although we usually do).
If you want to explain how density at a point changes over time, then plotting time along the horizontal axis (rather than position) makes more sense.
There exist many, many different types of graphs; histograms, pie charts, scatter plots, line graphs, bubble plots, ... they each have a different way to represent the information. And there is never a "one size fits all" - ask yourself what information you want to convey (if you already know the data and understand it), or what questions you are asking of the data (in case you are not yet sure yourself what you are looking for).
It's OK to draw multiple different graphs, too. Engage the visual parts of your brain - you will be unlocking a whole new supercomputer!