4-Graphics2013

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ●● ●● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● 7 bedrooms ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● 5 bedrooms ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● 4 bedrooms ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 8 bedrooms ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 200 400 600 800 ● ● 3 bedrooms ● ● ● 800 2 bedrooms ● 600 ● 400 ● ● 200 Price per square feet ● Price per square feet ● ● ● ● ● 3000 Square Feet ● 4000 5000 0 1000 2000 3000 Square Feet 4000 5000 Summary of graph rela9onships between two variables •  Two Qualita9ve variables – mosaicplot, side- by- side barplots •  One Quan9ta9ve and one Qualita9ve – Boxplots, dotcharts, mul9ple density plots, violin plots •  Two Quan9ta9ve variables – ScaUer plot, line plot What do you think of this plot? FIND 5 things that you would change Let’s fix it! Making good plots is an itera9ve process Goal is to convey a message as clearly as possible Visit the website hUp://www.stanford.edu/~vcs/StatData/chip04.txt Read it into R > chips = read.table("http:// www.stanford.edu/~vcs/StatData/ chip04.txt", header = TRUE)! ! > class(chips)! [1] "data.frame"! > names(chips)! [1] "Name" "Date" "Transistors" [4] "Microns" "ClockSpeed" "Data" [7] "MIPS" > dim(chips)! [1] 10 7 This is preUy easy to get plot(chips$Date, chips$Transistors,! type ="l", ! lwd = 3, ! col ="green",! log ="y")! ! How can we improve it even more? •  Add more data •  Add legend for different informa9on •  Add reference lines for important date Review Plovng Func9ons histogram •  abline() add line to canvas •  boxplot() boxplot •  dotchart() dotchart •  points() add points to canvas •  plot() for scaUer plots, line plots, density •  l...
View Full Document

This document was uploaded on 02/16/2014 for the course STATISTICS 3026 at Columbia.

Ask a homework question - tutors are online