axTicks               package:graphics               R Documentation

_C_o_m_p_u_t_e _A_x_i_s _T_i_c_k_m_a_r_k _L_o_c_a_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Compute pretty tickmark locations, the same way as R does
     internally. This is only non-trivial when *log* coordinates are
     active. By default, gives the 'at' values which 'axis(side)' would
     use.

_U_s_a_g_e:

     axTicks(side, axp = NULL, usr = NULL, log = NULL)

_A_r_g_u_m_e_n_t_s:

    side: integer in 1:4, as for 'axis'.

     axp: numeric vector of length three, defaulting to 'par("Zaxp")'
          where "Z" is "x" or "y" depending on the 'side' argument.

     usr: numeric vector of length four, defaulting to 'par("usr")'
          giving horizontal ('x') and vertical ('y') user coordinate
          limits.

     log: logical indicating if log coordinates are active; defaults to
          'par("Zlog")' where 'Z' is as for the 'axp' argument above.

_D_e_t_a_i_l_s:

     The 'axp', 'usr', and 'log' arguments must be consistent as their
     default values (the 'par(..)' results) are.  If you specify all
     three (as non-NULL), the graphics environment is not used at all. 
     Note that the meaning of 'axp' alters very much when 'log' is
     'TRUE', see the documentation on 'par(xaxp=.)'.

     'axTicks()' can be regarded as an R implementation  of the C
     function 'CreateAtVector()' in '..../src/main/plot.c' which is
     called by 'axis(side,*)' when no argument 'at' is specified.

_V_a_l_u_e:

     numeric vector of coordinate values at which axis tickmarks can be
     drawn.  By default, when only the first argument is specified,
     these values should be identical to those that 'axis(side)' would
     use or has used.

_S_e_e _A_l_s_o:

     'axis', 'par'.  'pretty' uses the same algorithm (but
     independently of the graphics environment) and has more options. 
     However it is not available for 'log = TRUE.'

_E_x_a_m_p_l_e_s:

      plot(1:7, 10*21:27)
      axTicks(1)
      axTicks(2)
      stopifnot(identical(axTicks(1), axTicks(3)),
                identical(axTicks(2), axTicks(4)))

     ## Show how axTicks() and axis() correspond :
     op <- par(mfrow = c(3,1))
     for(x in 9999*c(1,2,8)) {
         plot(x,9, log = "x")
         cat(formatC(par("xaxp"),wid=5),";",T <- axTicks(1),"\n")
         rug(T, col="red")
     }
     par(op)

