Skip to content

Commit

Permalink
plot1
Browse files Browse the repository at this point in the history
  • Loading branch information
icases committed Jan 9, 2015
1 parent 73fe5c6 commit 5a55cf6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plot1.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
temp <- tempfile()
download.file('http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip',temp)
all_data<-read.csv(unzip(temp),sep = ";",header = T,quote = "",na.strings='?')
unlink(temp)
my_data<-subset(all_data,Date=='1/2/2007' | Date=='2/2/2007')
my_data$dt<-strptime(paste(my_data$Date,my_data$Time),"%d/%m/%Y %T")
png('plot1.png',bg = "transparent")
hist(my_data$Global_active_power,col=2,main='Global Active Power',xlab='Global Active Power (kilowatts)')
dev.off()
Binary file added plot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5a55cf6

Please sign in to comment.