addlogo-methods            package:pixmap            R Documentation

_M_e_t_h_o_d_s _f_o_r _A_d_d_i_n_g _a _P_i_x_m_a_p _L_o_g_o _t_o _a _P_l_o_t

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

     This method allows the addition of a re-scaled pixmap to an
     existing plot, possibly as a logo, optionally preserving aspect. 
     It may be used interactively with 'locator', and is positioned in
     the coordinate system of the plot region.  Since the logo is
     displayed using 'image', it does not yet seem possible to use the
     function outside this region.

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

       addlogo(x, ...)
       ## S4 method for signature 'pixmap':
       addlogo(x, px, py, asp = NULL)

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

       x: an object of class 'pixmap'

      px: a vector of two x coordinates, or a list with two named
          elements x and y, such as that returned by 'locator'.

      py: if px is not a list, a vector of two y coordinates

     asp: if omitted or NULL (default), output respects both y
          coordinates, if a number greater than zero, aspect is
          preserved in proportion to the difference between x
          coordinates, multiplied by asp, and only the first y
          coordinate is respected.

     ...: potentially further arguments passed to and from methods.

_V_a_l_u_e:

     The same pixmap object with changed bounding box and cell
     resolution

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

     Roger Bivand

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

     x <- read.pnm(system.file("pictures/logo.ppm", package="pixmap")[1])
     plot(x)
     for (i in 1:7)
       addlogo(x, px=c(0, (101/77)*11), py=c((i-1)*11, i*11), asp=1)

