diff --git a/plot1.R b/plot1.R new file mode 100644 index 00000000000..452b2f9e5ef --- /dev/null +++ b/plot1.R @@ -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() diff --git a/plot1.png b/plot1.png new file mode 100644 index 00000000000..f3b2958ace6 Binary files /dev/null and b/plot1.png differ