home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / image < prev    next >
Encoding:
Text File  |  1997-04-23  |  2.1 KB  |  66 lines

  1.     
  2.     _D_i_s_p_l_a_y _a _c_o_l_o_r _i_m_a_g_e
  3.     
  4.          image(z, x, y, zlim, col=heat.colors(12), ...)
  5.     
  6.          heat.colors(n)
  7.          topo.colors(n)
  8.          terrain.colors(n)
  9.     
  10.     _A_r_g_u_m_e_n_t_s:
  11.     
  12.                z : a matrix containing the values to be plotted
  13.                    (NAs are allowed).
  14.     
  15.              x,y : locations of grid lines at which the values
  16.                    in z are measured.  These must be in ascend-
  17.                    ing order.  By default, equally spaced values
  18.                    from 0 to 1 are used.
  19.     
  20.             zlim : the minimum and maximum z values for which
  21.                    colors will be plotted.  Each of the given
  22.                    colors will be used to color an equispaced
  23.                    interval of this range
  24.     
  25.              col : A list of colors such as that generated by
  26.                    rainbow, heat.colors, topo.colors,
  27.                    terrain.colors or similar functions.
  28.     
  29.              ... : graphical parameters may also be passed as
  30.                    arguments to this function.
  31.     
  32.     _D_e_s_c_r_i_p_t_i_o_n:
  33.     
  34.          Creates a grid of colored or gray-scale rectangles with
  35.          colors corresponding to the values in z.  This can be
  36.          used to display three-dimensional or spatial data.  The
  37.          functions heat.colors, terrain.colors and topo.colors
  38.          create heat-spectrum (red to white) and topographical
  39.          color schemes suitable for displaying ordered data,
  40.          with n giving the number of colors desired.
  41.     
  42.     _N_o_t_e:
  43.     
  44.          This function is based on an interpreted function writ-
  45.          ten by Thomas Lumley (thomas@biostat.washington.edu).
  46.     
  47.     _S_e_e _A_l_s_o:
  48.     
  49.          heat.colors, topo.colors, terrain.colors, rainbow, hsv,
  50.          par.
  51.     
  52.     _E_x_a_m_p_l_e_s:
  53.     
  54.          data(volcano)
  55.          x <- 10*(1:nrow(volcano))
  56.          y <- 10*(1:ncol(volcano))
  57.          image(volcano, x, y,
  58.                  col=terrain.colors(100),axes=FALSE)
  59.          contour(volcano, x, y, zc=seq(90, 200, by=5),
  60.                  add=TRUE, col="peru")
  61.          axis(1, at=seq(100, 800, by=100))
  62.          axis(2, at=seq(100, 600, by=100))
  63.          box()
  64.          title(main="Maunga Whau Volcano", font.main=4)
  65.     
  66.