plotbyfactor             package:locfit             R Documentation

_x-_y _s_c_a_t_t_e_r_p_l_o_t, _c_o_l_o_r_e_d _b_y _l_e_v_e_l_s _o_f _a _f_a_c_t_o_r.

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

     Produces a scatter plot of x-y data, with different classes given
     by a factor f. The different classes are identified by different
     colours and/or symbols.

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

     plotbyfactor(x, y, f, data, col = 1:10, pch = "O", add = FALSE, lg,
         xlab = deparse(substitute(x)), ylab = deparse(substitute(y)),
         log = "", ...)

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

       x: Variable for x axis. 

       y: Variable for y axis. 

       f: Factor (or variable for which as.factor() works). 

    data: data frame for variables x, y, f. Default: sys.parent(). 

     col: Color numbers to use in plot. Will be replicated if shorter
          than the number of levels of the factor f. Default: 1:10. 

     pch: Vector of plot characters. Replicated if necessary. Default:
          "O". 

     add: If 'TRUE', add to existing plot. Otherwise, create new plot. 

      lg: Coordinates to place a legend. Default: Missing (no legend). 

xlab, ylab: Axes labels.

     log: Should the axes be in log scale? Use '"x"', '"y"', or '"xy"'
          to specify which axis to be in log scale.

     ...: Other graphical parameters, labels, titles e.t.c. 

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

     data(iris)
     plotbyfactor(petal.wid, petal.len, species, data=iris)

