I have a csv file with the following data.
Time,Type,RX,TX
2013-05-16 18:43:48,UP,0.72,10.86
2013-05-16 18:43:51,DOWN,68.74,1.67
2013-05-16 18:44:06,DOWN,104.01,2.52
2013-05-16 18:43:48,UP,1.21,10.94
2013-05-16 18:44:25,DOWN,104.07,2.54
I want two separate graphs:
RXandTXgraphed against time forType=UPRXandTXgraphed against time forType=DOWN
Here is my attempt. My problem is that both graphs contain all data.
plot = matplotlib.mlab.csv2rec(data_file)
fig = matplotlib.pyplot.figure()
subplot1 = matplotlib.pyplot.subplot(1,2,1)
subplot2 = matplotlib.pyplot.subplot(1,2,2)
subplot1.plot(plot.time, plot.rx)
subplot1.plot(plot.time, plot.tx)
subplot2.plot(plot.time, plot.rx)
subplot2.plot(plot.time, plot.tx)
Any ideas how I can do this?
plotas a variable name is greatly confusing. I don't quite understand your problem, you are telling it to plot all the data in both graphs, and it is doing so. What have you tried to filter your data?