scrgb                 package:ggplot                 R Documentation

_S_c_a_l_e: _c_o_l_o_u_r (_r_g_b)

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

     Scale continuous variables to red, green and blue components of
     colour.

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

     scrgb(plot = .PLOT, to=list())

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

    plot: plot to add scale to

      to: named list of target ranges (r.to, g.to, b.to, a.to)

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

     The RGB colour space is NOT perceptually uniform.  Use this scale
     with care.  It is extremely ill-advised to map variables to more
     than one of r, g, b, or a.

     Note: alpha mappings only work with the Quartz and PDF devices.

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

     Hadley Wickham <h.wickham@gmail.com>

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

     'map_colour_rgb', 'rgb'

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

     p <- scrgb(ggplot(movies, aes=list(y=rating, x=year)))
     ggpoint(p, list(r=year))
     ggpoint(p, list(b=rating))
     ggpoint(p, list(b=rating, r=1))
     scrgb(ggpoint(p, list(b=rating, r=1)), list(b.to=c(0.25,0.75)))
     ggpoint(p, list(b=rating, r=year))
     ggpoint(p, list(b=rating, r=year, g=year))

