This example in the matplotlib gallery looks like it will do what you want - you just need to fill in the graph and the x axis.
Alternatively, you can use a histogram with many individual pixel bars (or any other resolution you wanted).
NTN
source
share