1 / 6

S-PLUS Lecture 6

S-PLUS Lecture 6. Jaeyong Lee. Graphical Parameters. type = “c”: c =p (default), l, b,s,o,h,n. pch=“+” : character or numbers 1 – 18 lty=1 : numbers lwd=2 : numbers axes = “L”: L= F, T xlab =“string”, ylab=“string” sub = “string”, main =“string” xlim = c(lo,hi), ylim= c(lo,hi)

scot
Download Presentation

S-PLUS Lecture 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. S-PLUS Lecture 6 Jaeyong Lee

  2. Graphical Parameters type = “c”: c =p (default), l, b,s,o,h,n. pch=“+” : character or numbers 1 – 18 lty=1 : numbers lwd=2 : numbers axes = “L”: L= F, T xlab =“string”, ylab=“string” sub = “string”, main =“string” xlim = c(lo,hi), ylim= c(lo,hi) And some more.

  3. Session: Graphical Parameters x <- 1:10 y <- 2*x + rnorm(10,0,1) plot(x,y,type=“p”) #Try l,b,s,o,h,n # axes=T, F # xlab=“age”, ylab=“weight” # sub=“sub title”, main=“main title” # xlim=c(0,12), ylim=c(-1,12)

  4. Interactive Graphics Functions • locator(n,type=“p”) :Waits for the user to select locations on the current plot using the left mouse button. This continues until n (default 500) points have been selected. • identify(x, y, labels) : Allow the user to highlight any of the points defined by x and y. • text(x,y,”Hey”): Write text at coordinate x,y.

  5. Session: Interactive Graphics x <- 1:10 y <- 2*x + rnorm(10,0,1) plot(x,y) text(2, 3.5, “Hey!”) locator(2, type=“p”, pch=“+”) identify(1:3, 4:6, letters[1:3]) text(locator(1), "Outlier", adj=0)

  6. Session:Plots for Multivariate Data pairs(stack.x) x <- 1:20/20 y <- 1:20/20 z <- outer(x,y,function(a,b){cos(10*a*b)/(1+a*b^2)}) contour(x,y,z) persp(x,y,z) image(x,y,z)

More Related