plotStep               package:sfsmisc               R Documentation

_P_l_o_t _a _S_t_e_p _F_u_n_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Plots a step function f(x)= sum(i; y[i] * Ind[t[i-1], t[i])(x)),
     i.e., a piecewise constant function of one variable. With one
     argument, plots *the* empirical cumulative distribution function.

_U_s_a_g_e:

     plotStep(ti, y,
               cad.lag = TRUE,
               verticals = !cad.lag,
               left.points= cad.lag, right.points= FALSE, end.points= FALSE,
               add = FALSE,
               pch = par('pch'),
               xlab=deparse(substitute(ti)), ylab=deparse(substitute(y)),
               main=NULL, ...)

_A_r_g_u_m_e_n_t_s:

      ti: numeric vector = 'X[1:N]' or  't[0:n]'.

       y: numeric vector 'y[1:n]'; if omitted take y = k/N for
          empirical CDF.

 cad.lag: logical: Draw 'cad.lag', i.e., "_continue  droite, limite 
          gauche_".  Default = TRUE.

verticals: logical: Draw vertical lines?  Default= '! cad.lag'

left.points: logical: Draw left points?     Default= 'cad.lag'

right.points: logical: Draw right points?    Default= 'FALSE'

end.points: logical: Draw 2 end points?    Default= 'FALSE'

     add: logical: Add to existing plot?    Default= 'FALSE'

     pch: plotting character for points, see 'par()'.

xlab,ylab: labels of x- and y-axis

    main: main title; defaults to the call' if you do not want a title,
          use 'main = ""'.

     ...: Any valid argument to 'plot(..)'.

_V_a_l_u_e:

     *invisibly*:  List with components 't' and 'y'.

_S_i_d_e _E_f_f_e_c_t_s:

     Calls plot(..), points(..),  segments(..) appropriately and plots
     on current graphics device.

_A_u_t_h_o_r(_s):

     Martin Maechler, Seminar for Statistics, ETH Zurich,
     maechler@stat.math.ethz.ch, 1991 ff.

_S_e_e _A_l_s_o:

     The 'plot' methods 'plot.ecdf' and 'plot.stepfun' in R which are
     conceptually nicer.

     'segments(..., method = "constant")'.

_E_x_a_m_p_l_e_s:

     ##-- Draw an Empirical CDF  (and see the default title ..)
     plotStep(rnorm(15))

     plotStep(runif(25), cad.lag=FALSE)
     plotStep(runif(25), cad.lag=FALSE, add=TRUE, lty = 2)

     ui <- sort(runif(20))
     plotStep(ui, ni <- cumsum(rpois(19, lambda=1.5) - 1.5), cad.lag = FALSE)
     plotStep(ui, ni, verticals = TRUE, right.points = TRUE)

     plotStep(rnorm(201), pch = '.') #- smaller points

