clplot                package:plotrix                R Documentation

_P_l_o_t _l_i_n_e_s _w_i_t_h _c_o_l_o_r_s _d_e_t_e_r_m_i_n_e_d _b_y _v_a_l_u_e_s.

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

     'clplot' displays a plot of lines for which the colors are
     dependent upon the x and y values. 'clplot' is similar to
     'color.scale.lines' except that while the latter calculates a
     color for each unique value, 'clplot' assigns colors to groups of
     values within the cutpoints defined by 'levels'.

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

      clplot(x,y,ylab=deparse(substitute(y)),xlab=deparse(substitute(x)),
       levels=seq(min(y)+(max(y)-min(y))/5,max(y)-(max(y)-min(y))/5,length.out=4),
       cols=c("black","blue","green","orange","red"),lty=1,showcuts=FALSE,...)

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

     x,y: numeric data vectors.

ylab,xlab: Labels for the X and Y axes.

  levels: Cut points to assign colors to the values of 'x' and 'y'.

    cols: The colors to be assigned.

     lty: The line type.

showcuts: Whether to show the positions of the cut points.

     ...: additional arguments passed to 'plot' or 'lines'.

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

     nil

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

     Carl Witthoft

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

     'plot'

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

      x<-seq(1,100)
      y<-sin(x/5)+x/20
      clplot(x,y,main="Test of clplot")

