contourLines            package:grDevices            R Documentation

_C_a_l_c_u_l_a_t_e _C_o_n_t_o_u_r _L_i_n_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Calculate contour lines for a given set of data.

_U_s_a_g_e:

     contourLines(x = seq(0, 1, len = nrow(z)),
                  y = seq(0, 1, len = ncol(z)),
                  z, nlevels = 10,
                  levels = pretty(range(z, na.rm=TRUE), nlevels))

_A_r_g_u_m_e_n_t_s:

     x,y: locations of grid lines at which the values in 'z' are
          measured.  These must be in ascending order.  By default,
          equally spaced values from 0 to 1 are used.  If 'x' is a
          'list', its components 'x$x' and 'x$y' are used for 'x' and
          'y', respectively. If the list has component 'z' this is used
          for 'z'.

       z: a matrix containing the values to be plotted ('NA's are
          allowed).  Note that 'x' can be used instead of 'z' for
          convenience.

 nlevels: number of contour levels desired *iff* 'levels' is not
          supplied.

  levels: numeric vector of levels at which to draw contour lines.

_D_e_t_a_i_l_s:

     'contourLines' draws nothing, but returns a set of contour lines.

     There is currently no documentation about the algorithm. The
     source code is in '$R_HOME/src/main/plot3d.c'.

_V_a_l_u_e:

     A list of contours. Each contour is a list with elements: 

  level : The contour level.

      x : The x-coordinates of the contour.

      y : The y-coordinates of the contour.

_S_e_e _A_l_s_o:

     'contour'.

_E_x_a_m_p_l_e_s:

     x <- 10*1:nrow(volcano)
     y <- 10*1:ncol(volcano)
     contourLines(x, y, volcano)

