panel.superpose           package:lattice           R Documentation

_P_a_n_e_l _F_u_n_c_t_i_o_n _f_o_r _D_i_s_p_l_a_y _M_a_r_k_e_d _b_y _g_r_o_u_p_s

_D_e_s_c_r_i_p_t_i_o_n:

     This is an useful panel function for trellis displays. Uses a
     grouping variable, plotting the 'x' (and 'y' where appropriate)
     variables with different graphical properties for each distinct
     value of the grouping variable.

_U_s_a_g_e:

     panel.superpose(x, y, panel.groups = "panel.xyplot", subscripts, groups, type="p", ...)
     panel.superpose.2(x, y, subscripts, groups, type="p", ...)

_A_r_g_u_m_e_n_t_s:

     x,y: coordinates of the points to be displayed

panel.groups: the panel function to be used for each group of points.
          Defaults to 'panel.xyplot' (behaviour in S)

subscripts: subscripts giving indices in original data frame

  groups: a grouping variable. Different graphical parameters will be
          used to plot the subsets of observations given by each
          distinct value of 'groups'. The default graphical parameters
          are obtained from 'superpose.symbol' and 'superpose.line'
          using 'trellis.par.get' wherever appropriate 

    type: character vector specifying what should be drawn for each
          group. See 'panel.xyplot' for details of what the values can
          be. This is meaningful for 'panel.superpose' only when
          'panel.groups' is 'panel.xyplot'.

          The 2 functions 'panel.superpose' (with 'panel.xyplot') and
          'panel.superpose.2' differ only in the way the 'type'
          argument is interpreted. For the former, the interpretation
          is the same as for 'panel.xyplot' for each of the unique
          groups. For the latter, the 'type' vector is replicated to be
          as long as the number of unique values in 'groups', and the
          points corresponding to the different groups are plotted
          according to the corresponding type. 

          See 'xyplot' documentation for an example. 

     ...: other arguments (mostly graphical parameters, replicated to
          be as long as the number of groups), ultimately passed down
          to 'panel.xyplot'. In particular, colour can be specified
          using 3 arguments ('col, col.line, col.symbol'), as in
          'panel.xyplot'. 

_A_u_t_h_o_r(_s):

     Deepayan Sarkar deepayan@stat.wisc.edu ('panel.superpose.2'
     contributed by Neil Klepeis)

_S_e_e _A_l_s_o:

     Different functions when used as 'panel.groups' gives different
     types of plots, for example 'panel.xyplot', 'panel.dotplot' and 
     'panel.linejoin' (This can be used to produce interaction plots).

_E_x_a_m_p_l_e_s:

     data(barley)
     dotplot(variety ~ yield | site, barley, groups = year,
             layout = c(1, 6), aspect = .5,
             col.line = c("grey", "transparent"),  
             panel = "panel.superpose",
             panel.groups = "panel.dotplot")

