I often log DSP data to .log files, which are typically text files with comma separated columns. In order to plot the data I use a variant of the following Python file, which extracts the data columns and plots the results.
For easier human reading, I typically use ", " for separating the columns, rather than just a single ",". This requires the use of the separator specifier and the use of the 'python' engine because the 'c' engine does not support regex separators.
The nice thing about this is that human readable text can be inserted between the columns of data.
The main thing to be aware of is that all rows in the file must include the same number of columns otherwise read_csv() fails to read the file correctly.
To use this program:
python plot.py log_file.log
Copyright © 2023 Delta Numerix
No comments:
Post a Comment