pscontinuous             package:ggplot             R Documentation

_P_o_s_i_t_i_o_n: _c_o_n_t_i_n_u_o_u_s

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

     Add a continuous position scale to the plot

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

     pscontinuous(plot = .PLOT, variable="x", transform=trans_none, range=c(NA,NA), expand=c(0.05, 0), breaks=NULL)

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

    plot: plot

variable: variable ("x" or "y")

transform: transform function and it's inverse in a vector

   range: range, or leave missing to automatically determine

  expand: expansion vector (numeric vector, multiplicative and additive
          expansion)

  breaks: set breaks manually

_D_e_t_a_i_l_s:

     There are a few useful things that you can do with 'pscontinuous':

     *  set plot limits explicitly (with 'range')

     *  transform the scale (with 'transform')

     *  explicitly set where the axis labels (and grid lines) should
        appear (with 'breaks')

        Note, that if you explicitly set the axis range, you may want
        to use 'expand_range' to add a little extra room on each side.

        When transforming an axes, you need to supply the transforming
        function and it's inverse (used to create pretty axis labels). 
        I have created a few common ones for you:

     *  'trans_log10': log base 10

     *  'trans_log10': log base 2

     *  'trans_inverse': inverse

     *  'trans_sqrt': square root

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

     modified plot object

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

     Hadley Wickham <h.wickham@gmail.com>

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

     p <- ggpoint(ggplot(mtcars, aesthetics=list(x=mpg, y=disp)))
     pscontinuous(p, "x", range=c(20,30))
     pscontinuous(p, "y", breaks=seq(100, 400, 50)) 
     pscontinuous(p, "y", transform=trans_inverse)
     pscontinuous(p, "x", transform=trans_sqrt)
     pscontinuous(p, "x", transform=trans_log10)
     pscontinuous(p, "x", transform=trans_log10, breaks=seq(10,30, 5))

