AgTextLabel-class         package:Rgraphviz         R Documentation

_C_l_a_s_s "_A_g_T_e_x_t_L_a_b_e_l": _R_e_p_r_e_s_e_n_t_s _a _g_r_a_p_h_v_i_z _t_e_x_t _l_a_b_e_l

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

     This class is used to represent the textlabel object in C from the
     Graphviz library

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("AgTextLabel",
     ...)'.

_S_l_o_t_s:

     '_l_a_b_e_l_T_e_x_t': Object of class '"character"' The actual label text

     '_l_a_b_e_l_L_o_c': Object of class '"xyPoint"' The location of the label 

     '_l_a_b_e_l_J_u_s_t': Object of class '"character"' The justification of
          the label 

     '_l_a_b_e_l_W_i_d_t_h': Object of class '"integer"' The width of the label

     '_l_a_b_e_l_C_o_l_o_r': Object of class '"character"' The color to print the
          label 

     '_l_a_b_e_l_F_o_n_t_s_i_z_e': Object of class '"numeric"' The font size for the
          label

_M_e_t_h_o_d_s:

     _l_a_b_e_l_T_e_x_t Retrieves the labelText slot

     _l_a_b_e_l_L_o_c Retrieves the labelLoc slot

     _l_a_b_e_l_J_u_s_t Retrieves the labelJust slot

     _l_a_b_e_l_W_i_d_t_h Retrieves the labelWidth slot

     _l_a_b_e_l_C_o_l_o_r Retrieves the labelColor slot

     _l_a_b_e_l_F_o_n_t_s_i_z_e Retrieves the labelFontsize slot

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

     Jeff Gentry

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

     'AgEdge-class', 'AgNode-class'

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

     V <- letters[1:10]
     M <- 1:4
     g1 <- randomGraph(V, M, .2)

     ## Make the labels be the edge weights.  This code is from the vignette
     eAttrs <- list()
     ew <- edgeWeights(g1)
     lw <- unlist(unlist(ew))
     toRemove <- removedEdges(g1)
     lw <- lw[-toRemove]
     names(lw) <- edgeNames(g1)
     eAttrs$label <- lw

     z <- agopen(g1,"foo", edgeAttrs=eAttrs)
     x <- AgEdge(z)  ## list of AgEdge objects
     x[[1]]  ## AgEdge
     a <- txtLabel(x[[1]])
     a ## txtLabel object

     labelText(a)
     labelLoc(a)
     labelJust(a)
     labelWidth(a)
     labelColor(a)
     labelFontsize(a)

