To allow for quick and easy CSV graphing, this script csvPlot.py dynamically plots CSV data with both distance and throughput. The script takes one csv file with both vehicle and traffic data, then plots two lines showing vehicle position and the corresponding traffic value.
This script is found in: /root/Profiles/PostProcessing/csvPlot.py
Minimal usage:
python3 csvPlot.py ./data.csv --y_axis "Bandwidth (MBits/sec)"
Other parameters:
--logfile: <logfile.csv> the log file in CSV format; this is required
--x_axis: [time] the label for the x axis of the graph; defaults to "time"
--y_axis: the label for the y axis of the graph; this is required
--graph_type: [scatter] the type of graph to be made; options are "scatter" or "line"; defaults to "scatter"
--y1_color: [b] the color for the first y axis; defaults to 'b'
--y2_color: [r] the color for the second y axis; defaults to 'r'
The script uses a haversine function to plot a line showing the distance between the base station and the UE. This line defaults to red. The script then plots another line of whatever data the user specifies, defaulting to blue.
There is a matlab script we provide called plot_csv_data.m in the same directory if you prefer which can be invoked similarly
e.g.
plot_csv_data('merged_data.csv', 'time', 'Bandwidth(MBits/sec)', 'scatter', 'b', 'r');
An example graph showing MGEN data and vs. distance from the eNB