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

_A_r_g_u_m_e_n_t_s:

    plot: plot to add scale to

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

      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))

