X hits on this document

45 views

0 shares

0 downloads

0 comments

12 / 12

par(mfrow=c(2,2))

image( x1,x2,f)

persp( x1,x2,f)

contour( x1,x2,f)

# an important list for surface plots

look<-  list( x=x1, y=x2,z=f)

image(look)

LOCATE POINTS IN A MAP

>library(fields)

>US()

read.table("climate.txt")->climate

points( climate$lon, climate$lat, pch="x") # use period for plot character

text( climate$lon, climate$lat,  climate$elev) # label by elevation

## xlim and y lim to indicate the limits of your usa graph

US( xlim=c(-82, -73), ylim=c(32.5,41))

points( climate$lon, climate$lat, pch="o") # use period for plot character

# label by city names but make the text 1/2 the default size.

# left justify the label

locator(1)-> hold # now click on a point in the plot with the left button

hold # gives you the coordinates

points( hold, pch="X") #

text( hold$x, hold$y, "Here is my favorite place", adj=1)

Document info
Document views45
Page views49
Page last viewedThu Dec 08 00:35:41 UTC 2016
Pages12
Paragraphs458
Words1924

Comments