units                package:graphics                R Documentation

_G_r_a_p_h_i_c_a_l _U_n_i_t_s

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

     'xinch' and 'yinch' convert the specified number of inches given
     as their arguments into the correct units for plotting with
     graphics functions.  Usually, this only makes sense when normal
     coordinates are used, i.e., _no_ 'log' scale (see the 'log'
     argument to 'par').

     'xyinch' does the same for a pair of numbers 'xy', simultaneously.

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

     xinch(x = 1, warn.log = TRUE)
     yinch(y = 1, warn.log = TRUE)
     xyinch(xy = 1, warn.log = TRUE)

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

     x,y: numeric vector

      xy: numeric of length 1 or 2.

warn.log: logical; if 'TRUE', a warning is printed in case of active
          log scale.

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

     all(c(xinch(),yinch()) == xyinch()) # TRUE
     xyinch()
     xyinch #- to see that is really   delta{"usr"} / "pin"

     ## plot labels offset 0.12 inches to the right
     ## of plotted symbols in a plot
     with(mtcars, {
         plot(mpg, disp, pch=19, main= "Motor Trend Cars")
         text(mpg + xinch(0.12), disp, row.names(mtcars),
              adj = 0, cex = .7, col = 'blue')
         })

