I have some python code that receives a message every so often containing a timestamp and an edge transition, either low-to-high, or high-to-low. I'd like to graph each transition on a stripchart for a quick and dirty visualization of the digital waveform with the minimal amount of effort.
Can you recommend any methods or packages that would make this easy?
I'm also not opposed to exporting the data in, for instance, csv format and loading it into another program if that would be easier.
Edit:
Tried CairoPlot:
>>> data = [(10, 0), (11, 1), (12.5, 0), (15, 1)]
>>> def fn(t):
... for d in data:
... if t > d[0]:
... return d[1]
... return data[-1][1]
...
>>> CairoPlot.function_plot( 'tester.png', data, 500, 300, discrete = True, h_bounds=( data[0][0],data[-1][0]), step = 1 )
This pinned my CPU at 100% for more than 10 minutes and was steadily eating memory. I killed it before it used up all of swap. Am I doing something wrong or is CairoPlot just broken?
Further edit:
I now have something more workable using CairoPlot, based loosely on the above code. However, it's not perfect because of the resolution: I may need up to tens of nanoseconds (1e-8) resolution in order to catch some of the shorter pulses. For a multi-second graph, this takes a very long time with this method.