csv file format:
Name Jitter Latency PacketLoss TimeStamp
Joe 34 64 0 1324244672
Joe 54 23 1 1724584472
. . . . .
. . . . .
Mark 76 86 0 122428467
Mark 64 84 0 1824264672
. . . . .
. . . . .
John 74 23 1 1524284472
John 73 86 2 1224584672
my code:
#import libraries
import pandas as pd
import matplotlib.pyplot as plt
read data from csv file
data = pd.read_csv(r’C:\Users\james\Desktop\myfile.csv’,encoding=‘utf-8’).fillna(0)
#plot column “Jitter” of first 10 values
x=data[‘Jitter’].iloc[0:10].values
#display first 10 values
print(x)
#PLot item for line graph of RED color
#Need figure item
fig=plt.figure()
ax=fig.add_subplot(111)
#Title of the Graph
ax.set_title(“Plot of Jitter for Joe”)
#X axis label
ax.set_xlabel(“Time Samples”)
#Y axis label
ax.set_ylabel(“Data”)
#Legend
ax.plot(x,c=‘r’,label=“Jitter”)
leg = ax.legend()
#display graph
plt.show()
Note: this code is already working, it can already plot the Jitter values. I learned this in online tutorial
Questions:
- how i can insert the “Latency” and “PacketLoss” values to my graph of different color?
- How to plot remaining values for different names for Mark and John?
- How can I use the actual Timestamp to use as my time reference?
Your help is highly appreciated. I am a novice and just following examples from online tutorials.