contour-methods           package:flowViz           R Documentation

_C_o_n_t_o_u_r _p_l_o_t_s _f_o_r _f_l_o_w _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Basic contour plots for both 'flowFrame's and 'flowSet's. The
     densities for the contours are estimated using the fast kernel
     density estimation algorithm 'bkde2D'.

_U_s_a_g_e:

     ## method for 'flowFrame' objects
     ## S4 method for signature 'flowFrame':
     contour(
         x,
         y=1:2,
         nlevels=10,
         bw,
         grid.size=c(65,65),
         add=FALSE,
         xlab,
         ylab,
         lwd=1,
         lty=1,
         col=par("fg"),
         fill="transparent",
         ...)

     ## method for 'flowSet' objects
     ## S4 method for signature 'flowSet':
     contour(
         x,
         y=1:2,
         add=FALSE,
         xlab,
         ylab,
         lwd=1,
         lty=1,
         col=par("fg"),
         fill="transparent",
         ...)

_A_r_g_u_m_e_n_t_s:

       x: An object of class 'flowFrame' or 'flowSet'. 

       y: Numeric or character vector of length 2 indicating the
          channels to plot.

 nlevels: The approximate number of contour line levels, see 'contour'
          for details.

      bw: The bandwidth factor used for the kernel density estimation,
          see 'bkde2D' for details.

grid.size: The grid size used for the kernel density estimation, see
          'bkde2D' for details.

     add: Logical, indicating whether contour lines should be
          superimposed on an existing plot.

xlab, ylab: The axis annotation.

lwd, lty, col, fill: The usual plotting parameters, i.e. the line
          width, line type, line color and fill color. When using a
          fill color you should consider alpha blending to improve the
          results. 

     ...: Parameters that are passed on to the plotting functions.

_M_e_t_h_o_d_s:



     _x = "_f_l_o_w_F_r_a_m_e" A regular contour plot of the flow data in the
          frame. It can be added on top of an existing plot using the
          'add' argument.

     _x = "_f_l_o_w_S_e_t" Overlay of contours of densities for each individual
          frame in the set. You should consider using differnt colors
          and alpha blending to improve the result. This is only useful
          for a very limited number of frames in a set (~5), for larger
          sets you should consider a panelled lattice-type plot. Not
          that 'bw', 'gridSize' and 'nlevels' are passed on via the ...
          argument.


_A_u_t_h_o_r(_s):

     F. Hahne

_S_e_e _A_l_s_o:

     'bkde2D', 'contour', 'flowFrame', 'flowSet'

_E_x_a_m_p_l_e_s:

     data(GvHD)

     ## simple contour plot
     contour(GvHD[[1]])

     ## overlay with existing plot
     plot(GvHD[[1]], c("FSC-H", "SSC-H"))
     contour(GvHD[[1]], add=TRUE, col="lightgray", lty=3)

     ## colored contours
     contour(GvHD[[1]], fill="red")
     cols <- rainbow(3, alpha=0.1)
     contour(GvHD[[1]], fill=cols, col=cols)

     ## overlay of multiple flowFrames in a flowSet
     contour(GvHD[1:3], col=cols, fill=cols)

