bubble                  package:sp                  R Documentation

_C_r_e_a_t_e _a _b_u_b_b_l_e _p_l_o_t _o_f _s_p_a_t_i_a_l _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Create a bubble plot of spatial data, with options for bicolour
     residual plots (xyplot wrapper)

_U_s_a_g_e:

     bubble(obj, zcol = 1, ..., fill = TRUE, maxsize = 3, do.sqrt = TRUE, pch, 
             col = c(2,3), key.entries = quantile(data[,zcol]), main, 
             identify = FALSE, labels = row.names(data.frame(obj)), key.space = "right")

_A_r_g_u_m_e_n_t_s:

     obj: object of, or extending, class SpatialPointsDataFrame  or
          SpatialGridDataFrame, see coordinates or
          SpatialPointsDataFrame;  the object knows about its spatial
          coordinates

    zcol: z-variable column name, or column number after removing
          spatial coordinates from x@data: 1 refers to the first
          non-coordinate column 

    fill: logical; if TRUE, filled circles are plotted (pch = 16), 
          else open circles (pch = 1); the pch argument overrides this 

 maxsize: 'cex' value for largest circle 

 do.sqrt: logical; if TRUE the plotting symbol area (sqrt(diameter)) 
          is proportional to the value of the z-variable; if FALSE, the
          symbol size (diameter) is proportional to the z-variable 

     pch: plotting character 

     col: colours to be used; numeric vector of size two: first value
          is for negative values, second for positive values. 

key.entries: the values that will be plotted in the key; by default 
          the five quantiles min, q.25, median q.75, max 

    main: main plotting title 

identify: logical; if true, regular 'plot' is called instead of
          'xyplot', and followed by a call to 'identify()'. 

  labels: labels argument passed to 'plot' if 'identify' is TRUE 

     ...: arguments, passed to 'xyplot', or 'plot' if  identification
          is required. 

key.space: location of the key

_V_a_l_u_e:

     returns (or plots) the bubble plot; if 'identify' is TRUE, returns
     the indexes (row numbers) of identified points.

_A_u_t_h_o_r(_s):

     Edzer J. Pebesma

_R_e_f_e_r_e_n_c_e_s:

_S_e_e _A_l_s_o:

     xyplot, mapasp, identify

_E_x_a_m_p_l_e_s:

     data(meuse)
     coordinates(meuse) <- c("x", "y") # promote to SpatialDataFrame
     bubble(meuse, "cadmium", maxsize = 2.5, main = "cadmium concentrations (ppm)", 
         key.entries = 2^(-1:4))
     bubble(meuse, "zinc", main = "zinc concentrations (ppm)",
         key.entries =  100 * 2^(0:4))

