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 / mtext < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.5 KB  |  54 lines

  1.     
  2.     _W_r_i_t_e _t_e_x_t _i_n_t_o _t_h_e _m_a_r_g_i_n_s _o_f _a _p_l_o_t
  3.     
  4.          mtext(text=, side=3, line=0, outer=FALSE, at=, ...)
  5.     
  6.     _A_r_g_u_m_e_n_t_s:
  7.     
  8.             text : character string to be written
  9.     
  10.             side : on which side of the plot (1=bottom, 2=left,
  11.                    3=top, 4=right)
  12.     
  13.             line : on which MARgin line, starting at 0 counting
  14.                    outwards
  15.     
  16.            outer : use outer margins if available
  17.     
  18.               at : give location in user-coordinates
  19.     
  20.     _D_e_s_c_r_i_p_t_i_o_n:
  21.     
  22.          text is written in one of the four margins (side) of
  23.          the plot.  line measures the distance outwardly in
  24.          character size units.
  25.     
  26.         adj : length = 1 or 2 : adjustment in x- and y
  27.     
  28.         cex : character expansion factor (default = 1)
  29.     
  30.         col : color to use
  31.     
  32.        font : font for text
  33.     
  34.     _S_i_d_e-_e_f_f_e_c_t_s
  35.     
  36.          The given text is written onto the current plot.
  37.     
  38.     _S_e_e _A_l_s_o:
  39.     
  40.          title, text, plot.
  41.     
  42.     _E_x_a_m_p_l_e_s:
  43.     
  44.          plot(1:10, (-4:5)^2, main="Parabola Points", xlab="xlab")
  45.          mtext("10 of them")
  46.          for(s in c(1:2,4))
  47.              mtext(paste("mtext(..,side=",s,")"), side=s)
  48.          mtext("mtext(.., line= -2)", line = -2)
  49.          mtext("mtext(.., line= -1, adj = 0)", line = -1, adj =0)
  50.          ##--- log axis :
  51.          plot(1:10, exp(1:10), log='y', main="log='y'", xlab="xlab")
  52.          for(s in 1:4) mtext(paste("mtext(..,side=",s,")"), side=s)
  53.     
  54.