rug                   package:base                   R Documentation

_A_d_d _a _R_u_g _t_o _a _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Adds a rug representation (1-d plot) of the data to the plot.

_U_s_a_g_e:

     rug(x, ticksize=0.03, side=1, lwd=0.5, col)

_A_r_g_u_m_e_n_t_s:

       x: A numeric vector

ticksize: The length of the ticks making up the `rug'. Positive lengths
          give inwards ticks.

    side: On which side of the plot box the rug will be plotted.
          Normally 1 (bottom) or 3 (top).

     lwd: The line width of the ticks.

     col: The colour the ticks are plotted in, default is black.

_D_e_t_a_i_l_s:

     Because of the way `rug' is implemented, only values of `x' that
     fall within the plot region are included.  There will be a warning
     if any finite values are omitted, but non-finite values are
     omitted silently.

     Because of the way colours are done the axis itself is coloured
     the same as the ticks.  You can always replot the box in black if
     you don't like this feature.

_A_u_t_h_o_r(_s):

     B. D. Ripley

_S_e_e _A_l_s_o:

     `jitter' which you may want for ties in `x'.

_E_x_a_m_p_l_e_s:

     data(faithful)
     attach(faithful)
     plot(density(eruptions, bw=0.15))
     rug(eruptions)
     rug(jitter(eruptions, amount = .01), side = 3, col = "light blue")
     detach("faithful")

