sunflowerplot              package:base              R Documentation

_P_r_o_d_u_c_e _a _S_u_n_f_l_o_w_e_r _S_c_a_t_t_e_r _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Multiple points are plotted as "sunflowers" with multiple leaves
     ("petals") such that overplotting is visualized instead of
     accidental and invisible.

_U_s_a_g_e:

     sunflowerplot(x, y = NULL, number, log = "", digits = 6,
                  xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL,
                  add = FALSE, rotate = FALSE,
                  pch = 16, cex = 0.8, cex.fact = 1.5,
                  size = 1/8, seg.col = 2, seg.lwd = 1.5, ...)

_A_r_g_u_m_e_n_t_s:

       x: numeric vector of 'x'-coordinates of length 'n', say, or
          another valid plotting structure, as for 'plot.default', see
          also 'xy.coords'.

       y: numeric vector of 'y'-coordinates of length 'n'.

  number: integer vector of length 'n'. 'number[i]' = number of
          replicates for '(x[i],y[i])', may be 0.
           Default: compute the exact multiplicity of the points
          'x[],y[]'.

     log: character indicating log coordinate scale, see
          'plot.default'.

  digits: when 'number' is computed (i.e., not specified), 'x' and 'y'
          are rounded to 'digits' significant digits before
          multiplicities are computes.

xlab,ylab: character label for x-, or y-axis, respectively.

xlim,ylim: 'numeric(2)' limiting the extents of the x-, or y-axis.

     add: logical; should the plot be added on a previous one ? Default
          is 'FALSE'.

  rotate: logical; if 'TRUE', randomly rotate the sunflowers
          (preventing artefacts).

     pch: plotting character to be used for points ('number[i]==1') and
          center of sunflowers.

     cex: numeric; character size expansion of center points (s.
          'pch').

cex.fact: numeric _shrinking_ factor to be used for the center points
          _when there are flower leaves_, i.e., 'cex / cex.fact' is
          used for these.

    size: of sunflower leaves in inches, 1[in] := 2.54[cm]. Default:
          1/8\", approximately 3.2mm.

 seg.col: color to be used for the *seg*ments which make the sunflowers
          leaves, see 'par(col=)'; 'col = "gold"' reminds of real
          sunflowers.

 seg.lwd: numeric; the line width for the leaves' segments.

     ...: further arguments to 'plot' [if 'add=FALSE'].

_D_e_t_a_i_l_s:

     For 'number[i]==1', a (slightly enlarged) usual plotting symbol
     ('pch') is drawn. For 'number[i] > 1', a small plotting symbol is
     drawn and 'number[i]' equi-angular "rays" emanate from it.

     If 'rotate=TRUE' and 'number[i] >= 2', a random direction is
     chosen (instead of the y-axis) for the first ray.  The goal is to
     'jitter' the orientations of the sunflowers in order to prevent
     artefactual visual impressions.

_V_a_l_u_e:

     A list with three components of same length, 

       x: x coordinates

       y: y coordinates

  number: number

_S_i_d_e _E_f_f_e_c_t_s:

     A scatter plot is drawn with "sunflowers" as symbols.

_A_u_t_h_o_r(_s):

     Andreas Ruckstuhl, Werner Stahel, Martin Maechler, Tim Hesterberg,
     1989-1993.  Port to R by Martin Maechler
     maechler@stat.math.ethz.ch.

_R_e_f_e_r_e_n_c_e_s:

     Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A.
     (1983) _Graphical Methods for Data Analysis._  Wadsworth.

     Schilling, M. F. and Watkins, A. E. (1994) A suggestion for
     sunflower plots. _The American Statistician_, *48*, 303-305.

_S_e_e _A_l_s_o:

     'density'

_E_x_a_m_p_l_e_s:

     data(iris)
     ## 'number' is computed automatically:
     sunflowerplot(iris[, 3:4])
     ## Imitating  Chambers et al., p.109, closely:
     sunflowerplot(iris[, 3:4],cex=.2, cex.f=1, size=.035, seg.lwd=.8)

     sunflowerplot(x=sort(2*round(rnorm(100))), y= round(rnorm(100),0),
                  main = "Sunflower Plot of Rounded N(0,1)")

     ## A 'point process' {explicit 'number' argument}:
     sunflowerplot(rnorm(100),rnorm(100), number=rpois(n=100,lambda=2),
                             rotate=TRUE, main="Sunflower plot")

