X hits on this document

46 views

0 shares

0 downloads

0 comments

11 / 12

#to add points in the image:

      text(ozone.txt[,1:2], labels=ozone.txt[,3])

US(xlim = rx, ylim = ry, lwd = 2, col = 1,add=T)

#

#

#to create a 3-d plot:

       persp(surf$x,surf$y,surf$z)

# to get a contour:

       contour(surf$x,surf$y,surf$z)

#to add a legend to the image:

image.plot(surf$x,surf$y,surf$z, add = F,graphics.reset=T,col=topo.colors(12))

#

#DESCRIPTION of image:

#       Creates an image, under some graphics devices,  of  shades

#       of gray or colors that represent a third dimension.

#

#USAGE:

#       image(x, y, z, zlim = range(z), add = F)

#

#REQUIRED ARGUMENTS:

#x:     vector containing x coordinates of grid over which  z'  is

#       evaluated.   The  values  should  be  in increasing order;

#       missing values are not accepted.

#y:     vector of grid y coordinates.  The  values  should  be  in

#       increasing order; missing values are not accepted.

#z:    is a matrix, z[i,j]'  is

#       evaluated at x[i]', y[j]').  The rows of z' are indexed by

#       x',  and  the  columns  by  y'.  Missing values (NA's) are

#       allowed.

#####

#

# interp: Interpolates the value  of  the  third  variable  onto  an

# evenly spaced grid of the first two variables. default is 40x40

# grid

#to save the plot as a postscript file:

postscript(file="example.ps")

image.plot(surf$x,surf$y,surf$z, add = F,graphics.reset=T,col=topo.colors(12))

dev.off()

-----------------------------------------------------------------------------

# Using surface plotting

x1<- 5:10

x2<- 1:6

outer( x1,x2,"+")-> f

f

Document info
Document views46
Page views50
Page last viewedThu Dec 08 04:39:03 UTC 2016
Pages12
Paragraphs458
Words1924

Comments