I would like to plot the semi-hourly temperatures of 3 places into one plot. This is how the files look like (this is a part of Noble2.csv
; the other files are Noble3.csv
and Noble6.csv
):
Time Temp
1 08/20/14 02:05:02 PM 17.034
2 08/20/14 02:35:02 PM 16.749
3 08/20/14 03:05:02 PM 16.963
4 08/20/14 03:35:02 PM 16.820
5 08/20/14 04:05:02 PM 16.963
6 08/20/14 04:35:02 PM 17.153
7 08/20/14 05:05:02 PM 16.249
8 08/20/14 05:35:02 PM 15.652
9 08/20/14 06:05:02 PM 14.649
10 08/20/14 06:35:02 PM 13.906
11 08/20/14 07:05:02 PM 13.209
12 08/20/14 07:35:02 PM 12.316
13 08/20/14 08:05:02 PM 12.268
14 08/20/14 08:35:02 PM 12.243
15 08/20/14 09:05:02 PM 12.219
16 08/20/14 09:35:02 PM 12.171
17 08/20/14 10:05:02 PM 12.147
18 08/20/14 10:35:02 PM 12.122
19 08/20/14 11:05:02 PM 12.074
Noble3.csv:
Time Temp
1 08/20/14 02:06:59 PM 15.438 2 08/20/14 02:36:59 PM 13.882 3 08/20/14 03:06:59 PM 13.642 4 08/20/14 03:36:59 PM 13.353 5 08/20/14 04:06:59 PM 13.666 6 08/20/14 04:36:59 PM 12.074 7 08/20/14 05:06:59 PM 12.147 8 08/20/14 05:36:59 PM 12.219 9 08/20/14 06:06:59 PM 12.268 10 08/20/14 06:36:59 PM 12.292 11 08/20/14 07:06:59 PM 12.292 12 08/20/14 07:36:59 PM 12.268 13 08/20/14 08:06:59 PM 12.268 14 08/20/14 08:36:59 PM 12.243 15 08/20/14 09:06:59 PM 12.219 16 08/20/14 09:36:59 PM 12.171 17 08/20/14 10:06:59 PM 12.147 18 08/20/14 10:36:59 PM 12.122 19 08/20/14 11:06:59 PM 12.098
And Noble6.csv:
Time Temp
1 08/19/14 04:59:27 PM 12.001 2 08/19/14 05:29:27 PM 12.050 3 08/19/14 05:59:27 PM 12.122 4 08/19/14 06:29:27 PM 12.147 5 08/19/14 06:59:27 PM 12.171 6 08/19/14 07:29:27 PM 12.195 7 08/19/14 07:59:27 PM 12.219 8 08/19/14 08:29:27 PM 12.195 9 08/19/14 08:59:27 PM 12.171 10 08/19/14 09:29:27 PM 12.122 11 08/19/14 09:59:27 PM 12.074 12 08/19/14 10:29:27 PM 12.025 13 08/19/14 10:59:27 PM 11.977 14 08/19/14 11:29:27 PM 11.929 15 08/19/14 11:59:27 PM 11.880 16 08/20/14 12:29:27 AM 11.832 17 08/20/14 12:59:27 AM 11.783 18 08/20/14 01:29:27 AM 11.734 19 08/20/14 01:59:27 AM 11.662 20 08/20/14 02:29:27 AM 11.613
First, I tried to put the time column with a time format with the following commands:
> NB2<-strptime(Noble2$Time, "%m/%d/%y %I:%M:%S %p")
> NB3<-strptime(Noble3$Time, "%m/%d/%y %I:%M:%S %p")
> NB6<-strptime(Noble6$Time, "%m/%d/%y %I:%M:%S %p")
then I tried to put the temperature values as a list to be able to use the function plot:
> NB2T<-Noble2$Temp
> NB3T<-Noble3$Temp
> NB6T<-Noble6$Temp
just to check how it looks (before trying to put the 3 lines within one graph) I tried to plot NB2 Vs NB2T:
plot(NB2,NB2T,type="l",col="red")
this is what I got: this - which makes no sense. I should have gotten something like this (this one was made in excel).
I haven't got to the phase of adding the three lines to one graph, but could you point me into the right direction to get a correct graph first and how to add the other two lines to the graph?