forked from rdpeng/ExData_Plotting1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot2.R
23 lines (19 loc) · 859 Bytes
/
plot2.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
####################################################################################################
#
#+ Dataset download details are provided in the "Data_Download.md"
#+ Downloaded dataset is available in the folder "data"
#+ The downloaded dataset has been read, formatted, filtered and saved using "format.And.Filter.R"
#+ The filtered dataset is saved to the directory "data" ("dat.for.2days.RData")
#
####################################################################################################
#loading 2-day household energy usage data (2007-02-01 and 2007-02-02)
load(file = "./data/dat.for.2days.RData")
ls()
#+ plot-2
png(filename = "plot2.png",
width = 480, height = 480, units = "px")
with (dat.for.2days,
plot(datetime, Global_active_power, type="l", xlab="",
ylab="Global Active Power (kilowatts)", main="")
)
dev.off()