forked from rdpeng/ExData_Plotting1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot1.R
22 lines (19 loc) · 851 Bytes
/
plot1.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
####################################################################################################
#
#+ 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-1
png(filename = "plot1.png",
width = 480, height = 480, units = "px")
hist(dat.for.2days$Global_active_power,
main="Global Active Power",
xlab="Global Active Power (kilowatts)",
col="red" )
dev.off()