Download presentation
Presentation is loading. Please wait.
Published byAgnes Armstrong Modified over 9 years ago
1
Graphing Parameters Titles X-Axis Title Y-Axis Title Legend Scales Color Gridlines library(help="graphics") Basic Chart Types The R Graphics Package LineHistogram ScatterBox
2
Histogram of NFL Offense hist(nfl$OffPtsA,freq=F, breaks = 25, ylim = c(0,0.14), col = "blue") curve(dnorm(x, mean=mean(nfl$OffPtsA), sd=sd(nfl$OffPtsA)), col="purple", add=T)
3
Grammar of Graphics formations Legend Axes Seven Components
4
The anatomy of a graph ggplot2 Components
5
In ggplot2 a plot is made up of layers. ggplot2 Plot
6
ggplot2: geoms Ch4HistogramDensityBoxplotScatter Basic Labels Colors http://docs.ggplot2.org/current/
7
ggplot2: histogram
8
Histograms: NFL Example Create the plot object: nflHistogram <- ggplot(nfl, aes(OffPtsA)) + opts(legend.position = "none") Add the graphical layer: nflHistogram + geom_histogram(binwidth = 0.4 ) + labs(x = "NFL Offense Points", y = "Frequency")
9
Scatterplot: NFL Example
10
rCharts: Scatterplot
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.