scgradient              package:ggplot              R Documentation

_S_c_a_l_e: _c_o_l_o_u_r _g_r_a_d_i_e_n_t

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

     Scale a continuous variable along a colour gradient.

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

     scgradient(plot = .PLOT, low='red', mid='white', high="black", midpoint=0, range=c(NA,NA))

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

    plot: plot object to add scale to

     low: colour at low end of scale

     mid: colour at middle of scale

    high: colour at top of scale

midpoint: definition of midpoint

   range: range to scale data to

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

     This scale creates a continuous colour gradient from the low
     colour to the mid colour to high colour, as defined in the
     arguments.

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

     Hadley Wickham <h.wickham@gmail.com>

_S_e_e _A_l_s_o:

     'sccolour'

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

     p <- scgradient(ggplot(movies, aes=list(x=mpaa, y=rating)))
     ggjitter(p, list(colour=rating))
     ggjitter(p, list(colour=length))
     p <- ggjitter(p, list(colour=rating))
     scgradient(p, low="yellow")
     scgradient(p, high="green", midpoint=5)

