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 / rect < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.0 KB  |  36 lines

  1.     
  2.     _D_r_a_w _a _R_e_c_t_a_n_g_l_e
  3.     
  4.          rect(xleft, ybottom, xright, ytop, ...)
  5.     
  6.     _A_r_g_u_m_e_n_t_s:
  7.     
  8.            xleft : a vector (or scalar) of left x positions.
  9.     
  10.          ybottom : a vector (or scalar) of bottom y positions.
  11.     
  12.           xright : a vector (or scalar) of right x positions.
  13.     
  14.             ytop : a vector (or scalar) of top y positions.
  15.     
  16.              ... : graphical parameters passed to set.pars.
  17.     
  18.     _D_e_s_c_r_i_p_t_i_o_n:
  19.     
  20.          rect draws a rectangle (or sequence of rectangles) with
  21.          the given coordinates. It is a primitive funciton used
  22.          in hist.  The value supplied, ie. xleft, ..., are rela-
  23.          tive to the current plotting region. If the x-axis goes
  24.          from 100 to 200 then xleft must be larger than 100 and
  25.          xright must be less than 200.
  26.     
  27.     _E_x_a_m_p_l_e_s:
  28.     
  29.          # set up the plot region but don't plot
  30.          plot(c(100, 200), c(300, 400), type="n")
  31.     
  32.          # draw a rectangle with bottom left (150,320)
  33.          # and top right (177,380)
  34.          rect(150,320,177,380)
  35.     
  36.