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", name="", 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")

    name: name of the scale (used in the legend)

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_log2': 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))

