scatter                 package:ade4                 R Documentation

_S_c_a_t_t_e_r _P_l_o_t

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

     scatter is a generic function. It has methods for the classes
     'coa', 'dudi', 'fca', 'acm' and 'pco'.
      The scale of the grid is situated on the right-top of the graph.
      The points are in the middle of the labels.
      This process plots the graphs of the multivariate analyses.
      The two axes have the same scale.

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

     scatter(x, ...)

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

       x: an object used to select a method

     ...: further arguments passed to or from other methods

_D_e_t_a_i_l_s:

     The functions scatter use some utilities functions :

_s_c_a_t_t_e_r_u_t_i_l._b_a_s_e defines the bottom of the plot for all scatters

_s_c_a_t_t_e_r_u_t_i_l._c_h_u_l_l plots the polygons of the external contour

_s_c_a_t_t_e_r_u_t_i_l._e_i_g_e_n plots the eigenvalues bar plot

_s_c_a_t_t_e_r_u_t_i_l._e_l_l_i_p_s_e plots an inertia ellipse for a weighting
     distribution

_s_c_a_t_t_e_r_u_t_i_l._e_t_i._c_i_r_c puts labels on a correlation circle

_s_c_a_t_t_e_r_u_t_i_l._e_t_i puts labels centred on the points

_s_c_a_t_t_e_r_u_t_i_l._g_r_i_d plots a grid and adds a legend

_s_c_a_t_t_e_r_u_t_i_l._l_e_g_e_n_d._b_w._s_q_u_a_r_e puts a legend of values by square size

_s_c_a_t_t_e_r_u_t_i_l._l_e_g_e_n_d._s_q_u_a_r_e._g_r_e_y puts a legend by squares and grey levels

_s_c_a_t_t_e_r_u_t_i_l._l_e_g_e_n_d_g_r_i_s adds a legend of grey levels for the areas

_s_c_a_t_t_e_r_u_t_i_l._s_c_a_l_i_n_g to fit a plot on a background bipmap

_s_c_a_t_t_e_r_u_t_i_l._s_t_a_r plots a star for a weighting distribution

_s_c_a_t_t_e_r_u_t_i_l._s_u_b adds a string of characters in sub-title of a graph

_a_d_d._s_c_a_t_t_e_r._e_i_g adds a eigenvalues bar plot on a graph

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

     Daniel Chessel chessel@biomserv.univ-lyon1.fr

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

     's.arrow','s.chull','s.class', 's.corcircle','s.distri','s.label',
     's.match','s.traject','s.value'

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

     par(mfrow = c(3,3))
     plot.new()
     scatterutil.legendgris(1:20, 4, 1.6) 

     plot.new()
     scatterutil.sub("lkn5555555555lkn", csub = 2, possub = "bottomleft")
     scatterutil.sub("lkn5555555555lkn", csub = 1, possub = "topleft")
     scatterutil.sub("jdjjl", csub = 3, possub = "topright")
     scatterutil.sub("**", csub = 2, possub = "bottomright")

     x <- c(0.5,0.2,-0.5,-0.2) ; y <- c(0.2,0.5,-0.2,-0.5)
     eti <- c("toto", "kjbk", "gdgiglgl", "sdfg")
     plot(x, y, xlim = c(-1,1), ylim = c(-1,1))
     scatterutil.eti.circ(x, y, eti, 2.5)
     abline(0, 1, lty = 2) ; abline(0, -1, lty = 2)

     x <- c(0.5,0.2,-0.5,-0.2) ; y <- c(0.2,0.5,-0.2,-0.5)
     eti <- c("toto", "kjbk", "gdgiglgl", "sdfg")
     plot(x, y, xlim = c(-1,1), ylim = c(-1,1))
     scatterutil.eti(x, y, eti, 1.5)

     plot(runif(10,-3,5), runif(10,-1,1), asp = 1)
     scatterutil.grid(2)
     abline(h = 0, v = 0, lwd = 3)

     x <- runif(10,0,1) ; y <- rnorm(10) ; z <- rep(1,10)
     plot(x,y) ; scatterutil.star(x, y, z, 0.5)
     plot(x,y) ; scatterutil.star(x, y, z, 1)

     x <- c(runif(10,0,0.5), runif(10,0.5,1))
     y <- runif(20)
     plot(x, y, asp = 1) # asp=1 is essential to have perpendicular axes
     scatterutil.ellipse(x, y, rep(c(1,0), c(10,10)), cell = 1.5, ax = TRUE)
     scatterutil.ellipse(x, y, rep(c(0,1), c(10,10)), cell = 1.5, ax = TRUE)

     x <- c(runif(100,0,0.75), runif(100,0.25,1))
     y <- c(runif(100,0,0.75), runif(100,0.25,1))
     z <- factor(rep(c(1,2), c(100,100)))
     plot(x, y, pch = rep(c(1,20), c(100,100)))
     scatterutil.chull(x, y, z, opt = c(0.25,0.50,0.75,1))
     par(mfrow = c(1,1))

