colorNodes            package:pathRender            R Documentation

_a_t_t_a_c_h _n_o_d_e _c_o_l_o_r_i_n_g _i_n_f_o_r_m_a_t_i_o_n _t_o _a _g_r_a_p_h_N_E_L _i_n_s_t_a_n_c_e

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

     attach node coloring information to a graphNEL instance

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

     colorNodes(g, nodeAss, pal, attgen)

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

       g: graphNEL instance

 nodeAss: color map for nodes: vector with elements evaluating to
          colors and nodes as element names

     pal: a palette (use colorRampPalette for color interpolation) 

  attgen: attribute generating function - pwayRendAttrs is  prototype

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

     a graphNEL instance with additional rendering data

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

     Vince Carey <stvjc@channing.harvard.edu>

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

     example(randomGraph)
     nn = nodes(g1)
     x = runif(length(nn))
     names(x) = nn
     h1 = colorNodes(g1, x, colorRampPalette(brewer.pal(9, "Blues"))(length(nn)),
      pwayRendAttrs)
     h1

