SlidesRLec6

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: nt.sub font choices, 1 = plain text (the default), 2 = bold face, 3 = italic and 4 = bold italic. 23 Augmentation to Plots Some commands only work after a plot has been initiated. abline(a,b) draws line with intercept a and slope b. segments(...) draws line segment(s) from P to P . arrows(...) draws arrow(s) from P to P . lines(...) draws curves through points by line segments. points(...) plots symbols (pch) at specied locations. polygon(...), rect(...) draw polygons and rectangles. text(...) puts specied text at selected positions. legend(...) adds legends to plots. mtext(...) adds text to plot margins. and lots more ⇒ help.start() ⇒ Graphics ⇒ aplot. 1 1 24 2 2 Lake Huron Water Level Data illustrating plot argument type = par(mfrow=c(1,3)) plot(LakeHuron,type="l",main=’type="l"’) # points connected by lines plot(LakeHuron,type="p",main=’type="p"’) # only points are plotted plot(LakeHuron,type="b",main=’type="b"’) # both points and lines are plotted # see ?plot for more on the type argument 25 Lake Huron Plots 582 type="b" 582 type="p" 582 type="l" q q q q q q q q q q 581 q q q q q q q q q q q q q q q q q q q q q q qq q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q 579 579 LakeHuron qq q q q q q q q LakeHuron q q q 580 q q LakeHuron q q q 580 580 q q q q q q q q qq q q q q q qq 579 581 581 q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q 578 q q qq q q q q q 578 578 q q q q q q q qq q q q q q q q q q q qq q q q q q q q 577 577 577 q q q qq q q q q q 1880 1900 1920 Time 26 1940 1960 1880 1900 1920 Time 1940 q q q q 1960 576 576 576 q q q q 1880 1900 1920 Time 1940 1960 Fisher's or Anderson's Iris Data str(iris) ’data.frame’: 150 obs. of 5 variables: $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4. $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1. $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0. $ Species : Factor w/ 3 levels...
View Full Document

This note was uploaded on 02/25/2014 for the course STAT 302 taught by Professor Fritz during the Winter '13 term at University of Washington.

Ask a homework question - tutors are online