GraphvizAttributes         package:Rgraphviz         R Documentation

_G_r_a_p_h _A_t_t_r_i_b_u_t_e_s _f_o_r _R_g_r_a_p_h_v_i_z

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

     The following describes the allowable attributes to be used with
     Rgraphviz.  Most of these are sent directly to Graphviz and will
     influence the plot layout, some of these are only cosmetic and
     stay in R.  Users are referred to the Graphviz web documentation
     which contains some more detailed information on these attributes
     (and is our source).

_G_r_a_p_h _A_t_t_r_i_b_u_t_e_s:

     *General Graph Attributes:*

     '_b_g_c_o_l_o_r': Color for the entire canvas.  The default is to use
          'transparent' 

     '_c_e_n_t_e_r': Drawing is centered in the output canvas. This is a
          boolean value with a default of 'FALSE'.

     '_f_o_n_t_c_o_l_o_r': Color used for text, defaulting to 'black'.

     '_f_o_n_t_n_a_m_e': Font used for text.  Default is Times Roman.

     '_f_o_n_t_p_a_t_h': Directory used to search for fonts

     '_f_o_n_t_s_i_z_e': Font size, in points, for text.  This attribute
          accepts doubles for values with a default of '14.0' and a
          minimum value of '1.0'

     '_l_a_b_e_l': Label for the graph.  This is a string with some extra
          escape sequences which can be used.  The substring '\N' is
          replaced by the name of the node, and the substring '\G' by
          the name of the graph.  For graph or cluster attributes, '\G'
          is replaced by the name of the graph or cluster.  For edge
          attributes, the substring '\N' is replaced by the name of the
          edge, and the substrings '\T' and '\H' by the names of the
          tail and head nodes.  The default value for nodes is '\N'
          with everything else defaulting to ''

     '_l_a_b_e_l_j_u_s_t': Subgraphs inherit cluster behavior for labeljust.  If
          'r', the labels are right-justified within the bounding
          rectangle.  If 'l' they are left-justified. Otherwise the
          labels are centered.  The default value is 'c'. 

     '_l_a_b_e_l_l_o_c': Top/bottom placement for graph labels.  A value of 't'
          places the label at the top, 'b' places them at the bottom. 
          By default root graph labels go on the bottom and cluster
          labels go on the top.

     '_l_a_y_e_r_s': Specifies a linearly ordered list of layer names
          attached to the graph.  Only those components belonging to
          the current layer appear.  This attribute accepts a
          'layerList', which is list of strings separated by the
          characters defined with the 'layersep' attribute which
          defines layer names and implicitly numbered 1,2,etc.  The
          default is '' which only uses one layer.

     '_l_a_y_e_r_s_e_p': Separator characters used to split the layers into a
          list of names.  The default is colons, tabs or spaces. 

     '_m_a_r_g_i_n': Set X&Y margins of canvas in inches. Specified using the
          notation 'val,val' where each val is a double. 

     '_o_r_i_e_n_t_a_t_i_o_n': If "[1L*]*", set graph orientation to landscape. 
          Used only if 'rotate' is not defined.  Default is the empty
          string.

     '_p_a_g_e': Width & height of output pages, in inches.  If set and
          smaller then the size of the layout, a rectangular array of
          pages of the specified page size is overlaid on the layout,
          with origins aligned in the lower-left corner, thereby
          partitioning the layout into pages.  The pages are then
          produced one at a time in 'pagedir' order.  Specified using
          the notion 'val,val' where each val is a double.

     '_p_a_g_e_d_i_r': If the 'page' attribute is set and applicable, this
          attribute specifies the order in which the pages are emitted.
           This is limited to one of the 8 row or column major orders. 
          One of 'BL', 'BR', 'TR', 'RB', 'RT', 'LB', or 'LT' specifying
          the 8 row or column major orders for traversing a rectangular
          array (the first character corresponding to the major order
          and the second to the minor order).  The default value is
          'BL'

     '_q_u_a_n_t_u_m': If 'quantum' > 0.0, node label dimensions will be
          rounded to integral multiples of the quantum.  This attribute
          is of type double, with a default and minimum value of '0.0' 

     '_r_a_n_k_s_e_p': In dot, this gives the desired rank separation in
          inches.  If the value contains 'equally', the centers of all
          the ranks are spaced equally apart.  In twopi, specifies the
          separation of concentric circles.  This value is of type
          double, with a minimum value of '0.02'.  In dot, the default
          value is '0.5' and for twopi it is '1.0'. 

     '_r_a_t_i_o': Sets the aspect ratio for the drawing.  If numeric,
          defines aspect ratio.  If it is 'fill' and 'size' has been
          set, node positions are scaled such that the final drawing
          fills exactly the specified size.  If 'compress' and the
          'size' attribute is set and the graph can not be drawn on a
          single page, then the drawing is compressed to fit in the
          given size.  If 'auto', the 'page' attribute is set and the
          graph cannot be drawn on a single page, then 'size' is set to
          an "ideal" value.  The default for this attribute is "fill"

     '_r_o_t_a_t_e': If 90, set drawing orientation to landscape. This
          attribute accepts integer values and defaults to '0'

     '_s_a_m_p_l_e_p_o_i_n_t_s': If the input graph defines the 'vertices'
          attribute, and output is dot or xdot, this gives the number
          of points used to represent circles and ellipses.  It plays
          the same role in neato, when adjusting the layout to avoid
          overlapping nodes.  This attribute accepts integer values and
          defaults to '8' 

     '_s_i_z_e': Maximum width and height of drawing, in inches. Specified
          using the notation 'val,val' where each val is a double.  If
          not specified and there is a current output device, the graph
          is scaled to fit into that device.  If 'size' is not
          specified and there is no current output device, a plot
          region of the default size will be opened and the graph
          scaled to match that. 

     '_s_t_a_r_t': Parameter used to determine the initial layout of nodes. 
          By default, nodes are randomly placed in a square whose sides
          have length (number of nodes).  The same seed is always used
          for the random number generator, so the initial placement is
          repeatable.  If 'start' converts to an integer, this is used
          as a seed value for the RNG.  If 'start' is "regular", the
          nodes are placed regularly about a circle.  Finally if
          'start' is defined, and not one of those cases, the current
          time is used to pick a seed.  The default is the empty
          string.

     *Dot Only Attributes*

     '_c_l_u_s_t_e_r_r_a_n_k': Mode used for handling clusters.  If "local", a
          subgraph whose name begins with "cluster" is given special
          treatment.  The subgraph is laid out separately, and then 
          integrated as a unit into its parent graph.  If the cluster
          has a 'label' parameter, this label is displayed w/ the
          cluster. Acceptable values are 'local', 'global' or 'none' -
          with 'local' being the default. 

     '_c_o_m_p_o_u_n_d': Allow edges between clusters.  This is a boolean value
          with a default of 'FALSE'

     '_c_o_n_c_e_n_t_r_a_t_e': Use edge concentrators.  This is a boolean value
          with a default of 'FALSE'

     '_m_c_l_i_m_i_t': Scale factor used to alter the 'MinQuit' and 'MaxIter'
          parameters used during crossing minimization.  This is a
          double value with a default of '1.0'

     '_n_o_d_e_s_e_p': Minimum space between two adjacent nodes of the same
          rank, in inches.  This is a double value with a default of
          '0.25' and a minimum of '0.02'

     '_o_r_d_e_r_i_n_g': If 'out' for a graph and n is a node in G, then edges
          n->* appear left to right in the order that they were
          defined.

     '_r_a_n_k_d_i_r': Determines if the layout is left-to-right or
          top-to-bottom.  Acceptable values are 'LR' and 'TB' with the
          default being the latter.

     '_r_e_m_i_n_c_r_o_s_s': If 'TRUE' and there are multiple clusters, run cross
          minimization a second time.  Default is 'FALSE'

     '_s_e_a_r_c_h_s_i_z_e': During network simplex, maximum number of edges with
          negative cut values to search when looking for one with
          minimum cut value.  This is an integer value with a default
          of '30'

     '_s_h_o_w_b_o_x_e_s': Debugging feature for postscript output, R only.  Not
          currently implemented.

     *Neato Only Attributes*

     '_D_a_m_p_i_n_g': Factor damping force motions.  On each iteration, a
          node's movement is limited to this factor of its potential
          motion.  This is a double value with a default of '0.99' and
          a minimum value of '0.0'

     '_d_e_f_a_u_l_t_d_i_s_t': Default distance between nodes in separate
          connected components.  Only applicable if 'pack=FALSE'. 
          Defaults to '1+(avg. len)*sqrt(|V|)' and has a minimum value
          of 'epsilon'.

     '_d_i_m': Set the number of dimensions used for the layout.  This is
          an integer value with a default and minimum value of '2'.

     '_e_p_s_i_l_o_n': Terminating condition.  If length squared of all energy
          gradients are less than epsilon, the algorithm stops. This is
          a double value with a default of '.0001 times the number of
          nodes'. 

     '_m_a_x_i_t_e_r': Sets the number of iterations used.  This is an integer
          value with the default of 'MAXINT'.

     '_m_o_d_e_l': If 'circuit', use circuit resistance model to compute
          dissimilarity values, otherwise use shortest path. Defaults
          to the empty string.

     *Twopi Only Attributes*

     '_r_o_o_t': Name of the node to use as the center of the layout.  If
          not defined, will pick the most central node.

     *Not Dot Attributes*

     '_n_o_r_m_a_l_i_z_e': Normalize coordinates of final layout so that the
          first point is at the origin, then rotate so that the first
          edge is horizontal.  This is a boolean value with a default
          of 'FALSE'.

     '_o_v_e_r_l_a_p': If 'scale', remove node overlaps by scaling.  If
          'FALSE', use Voronoi technique, otherwise leave overlaps. 
          Default is the empty string.

     '_p_a_c_k': If "true" or non-negative integer - each connected
          component is laid out separately and then the graphs are
          packed tightly.  If pack has an integral value, this is used
          as the size (in points) of a margin around each part;
          otherwise a default margin of 8 is used. If 'false', the
          entire graph is laid out together.  For twopi layouts, this
          just sets the margin.  Default is 'FALSE'

     '_p_a_c_k_m_o_d_e': Indicates the granularity and method used for packing.
           This will automatically turn on 'pack'. Acceptable values
          are 'node', 'clust' and 'graph', specifying the granularity
          of packing connected components when 'pack=TRUE'.  The
          default is 'node'.

     '_s_e_p': Fraction to increase polygons for purposes of determining
          overlap.  This is a double value with a default of '0.01'.

     '_s_p_l_i_n_e_s': Draw edges as splines.  This is a boolean value with a
          default of 'TRUE'.

     '_v_o_r_o__m_a_r_g_i_n': Factor to scale up drawing to allow margin for
          expansion in Voronoi technique.  This is a double value with
          a default of '0.05' and a minimum value of '0.0' 

     *Output Based*

     '_r_e_s_o_l_u_t_i_o_n': Number of pixels per inch on a display, used for SVG
          output.  The default for this attribute is '0.96' and it
          accepts values of type double.

     '_s_t_y_l_e_s_h_e_e_t': A URL or pathname specifying a XML style sheet, for
          SVG output.

     '_t_r_u_e_c_o_l_o_r': Output relies on a truecolor color model, used with
          bitmap outputs.  This is a boolean value with a default of
          'FALSE'

     *Misc*

     '_U_R_L': Hyperlink incorporated into the output.  For whole graphs,
          used as part of an image map.  Not currently implemented

     '_c_o_m_m_e_n_t': A device dependent commentary.  Not currently
          implemented.

     '_n_s_l_i_m_i_t': Number of iterations in network simplex applications. 
          Used in computing node x coordinates

     '_n_s_l_i_m_i_t_1': Same as 'nslimit' but for ranking nodes

     '_o_u_t_p_u_t_o_r_d_e_r': Specify order in which nodes and edges are drawn. 
          R only

_E_d_g_e _A_t_t_r_i_b_u_t_e_s:

     *General Edge Attributes*

     '_a_r_r_o_w_h_e_a_d': Shape of the arrowhead.  Currently somewhat limited
          in what can be rendered in R as opposed to what is available
          via Graphviz in that only 'open' and 'none' are allowed.  The
          'open' is used by default for directed edges and 'none' for
          undirected edges.  R only(?)

     '_a_r_r_o_w_s_i_z_e': Multiplicative scale factor for arrowheads, type
          double.  R only (?).  This attribute accepts values of type
          double with a default of '1.0' and minimum of '1.0'.

     '_a_r_r_o_w_t_a_i_l': Style of arrow on the tail node of an edge, see
          'arrowhead'.  For directed edges that with bidirectional
          arrows, 'open' is used.  R only(?)

     '_c_o_l_o_r': The color of the edge.  Defaults to 'black'. 

     '_d_e_c_o_r_a_t_e': If TRUE, attach edge label to edge by a 2-segment
          polyline, underlining the label, then going to the closest
          point of the spline.  Default is 'FALSE'.  Currently
          unimplemented. 

     '_d_i_r': Edge type drawing, which ends should get the arrowhead.  R
          only(?).  For directed graphs, this defaults to 'forward' and
          undirected graphs default to 'both'. Other possible values
          are 'both' (arrows in both directions) and 'back' (Arrow on
          the tail only)

     '_f_o_n_t_c_o_l_o_r': The color used for text.  The default value is
          'black' in R

     '_f_o_n_t_n_a_m_e': Font used for text.  Defaults to Times Roman. 
          Currently unimplemented.

     '_f_o_n_t_s_i_z_e': Font size, used for text.  Defaults to '14.0' with a
          minimum value of '1.0'

     '_h_e_a_d_c_l_i_p': Head of the edge is clipped to the boundary of the
          head node, otherwise it goes to the center of the node. This
          is a boolean value with the default of 'TRUE'. Currently
          unimplemented

     '_h_e_a_d_l_a_b_e_l': Label for the head of the edge.  See 'label' in
          'Graph Attributes' for a description of additional escape
          sequences.  Currently unimplemented.

     '_h_e_a_d_p_o_r_t': Where on the node to aim the edges, uses 'center',
          'n', 's', 'e', 'nw', 'nw', 'se', and 'sw'.  The default is
          'center'.

     '_l_a_b_e_l': The edge label.  See 'label' in 'Graph Attributes' for a
          description of additional escape sequences.

     '_l_a_b_e_l_a_n_g_l_e': Angle in degrees that the label is rotated, as a
          double.  Default is '-25.0' with a minimum value of '-180.0'.
           Currently unimplemented.

     '_l_a_b_e_l_d_i_s_t_a_n_c_e': Multiplicative scaling factor adjusting the
          distance that the label is from the node.  This is a double
          value with a default of '1.0' and a minimum value of '0.0'.

     '_l_a_y_e_r': Specifies the layers that this edge is present, type of
          'layerRange'.  This is specified as a string in the format
          'layerID' or 'layerIDslayerIDslayerID...', where 's' is a
          character from the 'layersep' attribute.  The 'layerID'
          attribute can be 'all', a decimal integer or a layer name. 
          Defaults to the empty string. 

     '_s_t_y_l_e': Set line style for the edge.  R only.  Can be one of
          'dashed', 'dotted', 'solid', 'invis' and 'bold'.  Defaults to
          'solid'.

     '_t_a_i_l_c_l_i_p': Same as 'headclip' except for the tail of the edge. 
          Defaults to 'TRUE'.  Currently unimplemented.

     '_t_a_i_l_l_a_b_e_l': Same as 'headlabel' except for the tail of the edge. 
          Defaults to the empty string.  Currently unimplemented. 

     '_w_e_i_g_h_t': The weight of the edge.  This attribute is of type
          double with a default of '0.75' and a minimum value of
          '0.01'. 

     *Dot Only Attributes*

     '_c_o_n_s_t_r_a_i_n_t': If FALSE, edge is not used in ranking nodes. 
          Default is 'TRUE'.

     '_l_h_e_a_d': Logical head of an edge.  If 'compound' is TRUE, if
          'lhead' is defined and is the name of a cluster containing
          the real head, then the edge is clipped to the boundary of
          the cluster.

     '_l_t_a_i_l': Same as 'lhead' but for the tail of the edge

     '_m_i_n_l_e_n': Minimum edge length (rank difference between head and
          tail).  This is an integer value with a default of '1' and a
          minimum of '0'.

     '_s_a_m_e_h_e_a_d': Edges with the same head and 'samehead' value are
          aimed at the same point on the head node.

     '_s_a_m_e_t_a_i_l': Same as 'samehead' but for the tail of the edge.

     *Neato Only Attributes*

     '_l_e_n': Preferred edge length, in inches.  This attribute accepts
          double values with a default of '1.0'.

     *Misc*

     '_U_R_L': Hyperlink incorporated into the output.  Not currently
          supported

     '_h_e_a_d_U_R_L': URL for the head of the edge.  Not currently supported

     '_h_e_a_d_t_o_o_l_t_i_p': If there's a headURL, annotation for a tooltip.  R
          only, not currently supported

     '_t_a_i_l_U_R_L': Same as 'headURL' but for the tail of an edge

     '_t_a_i_l_t_o_o_l_t_i_p': Same as 'headtooltip' but for the head of an edge

     '_t_o_o_l_t_i_p': Same as 'headtooltip' but for the edge in general

     '_s_h_o_w_b_o_x_e_s': Debugging feature for postscript.  Not currently
          supported

     '_c_o_m_m_e_n_t': Device dependent comment inserted into the output.  Not
          currently supported

_N_o_d_e _A_t_t_r_i_b_u_t_e_s:

     *General Node Attributes*

     '_c_o_l_o_r': Basic drawing color for the node, corresponding to the
          outside edge of the node.  The interior of the node is
          specified with the 'fillcolor' attribute. Defaults to
          'black'. 

     '_d_i_s_t_o_r_t_i_o_n': Distortion factor for 'shape=polygon', positive
          values cause top to be larger then bottom, negative is
          opposite.  This is a double value with a default of '0.0' and
          a minimum value of '-100.0'

     '_f_i_l_l_c_o_l_o_r': Background color of the node.  This defaults to
          'black'. 

     '_f_i_x_e_d_s_i_z_e': Use only 'width' and 'height' attributes, do not
          expand for the width of the label.  This defaults to 'TRUE'.

     '_f_o_n_t_c_o_l_o_r': Color used for text.  This defaults to 'black'.

     '_f_o_n_t_n_a_m_e': Font used for text.  The default of this is Times
          Roman.

     '_f_o_n_t_s_i_z_e': Size of font for the text.  This defaults to '14.0'
          with a minimum size of '1.0'.

     '_h_e_i_g_h_t': Height of the node, in inches.  This attribute accepts
          values as doubles with a default of '0.5' and a minimum value
          of '0.02'. 

     '_l_a_b_e_l': Label for the node.  See 'label' in 'Graph Attributes'
          for an explanation of extra escape sequences.

     '_l_a_y_e_r': Layers in which the node is present.  See 'layer' in
          'Edge Attributes' for an explanation of acceptable inputs. 

     '_p_e_r_i_p_h_e_r_i_e_s': Set number of peripheries used in polygonal shapes
          and cluster boundaries.  Note that user-defined shapes are
          treated as a form box shape, so the default peripheries value
          is 1 and the user-defined shape will be drawn in a bounding
          rectangle.  Setting peripheries=0 will turn this off.  Also,
          1 is the maximum peripheries value for clusters.  Not
          currently implemented.

     '_p_o_s': Position of the node (For neato layouts, this is the
          initial position of the node).   Specified using the notion
          'val,val' where each val is a double.

     '_r_e_g_u_l_a_r': Force the polygon to be regular.  Defaults to 'FALSE'. 

     '_s_h_a_p_e': The shape of the node.  Current acceptable values are
          'circle', 'rectangle', 'rect', 'box' and 'ellipse'.  The
          'circle' shape is the default.  Note that 'box', 'rect' and
          'rectangle' all correspond to the same actual shape.

     '_s_i_d_e_s': Number of sides if 'shape=polygon'.  This is an integer
          value with a default value of '4' and a minimum value of '0'.

     '_s_k_e_w': Skew factor for 'shape=polygon'.  Positive values skew the
          polygon to the right, negative to the left.  This is a double
          value with a default value of '0.0' and a minimum value of
          '-100.0'.

     '_s_t_y_l_e': Set style for the node boundary.  R only.  Can be one of
          'dashed', 'dotted', 'solid', 'invis' and 'bold'.  Defaults to
          'solid'.

     '_w_i_d_t_h': Width of the node, in inches.  Default is '0.75' with a
          minimum value of '0.01'

     *Dot Only Attributes*

     '_g_r_o_u_p': If the end points of an edge belong to the same group, ie
          they have the same group attributes, parameters are set to
          avoid crossings and keep the edges straight

     *Neato Only Attributes*

     '_p_i_n': If TRUE and node has a 'pos' attribute on input, neato
          prevents the node from moving from the input position.  The
          default for this attribute is 'FALSE'.

     *Misc*

     '_t_o_o_l_t_i_p': Annotated tooltip if URL exists.  R only. Currently
          unsupported

     '_t_o_p_l_a_b_e_l': Label near the top of nodes of shape M*. Currently
          unsupported

     '_U_R_L': Hyperlink incorporated into the output.  Not currently
          supported

     '_b_o_t_t_o_m_l_a_b_e_l': Same as 'toplabel' but for the bottom of the node

     '_c_o_m_m_e_n_t': Device dependent comment inserted into the output.  Not
          currently supported

     '_s_h_a_p_e_f_i_l_l': If non-empty, if output is ps or svg and shape is
          'espf', taken as a filename containing a device-dependent
          description of a node's shape.  If non-empty for bitmap
          output (gif, jpg, etc), and shape set to 'custom', taken as
          the URL for a file containing the bitmap image for the node. 
          For files on the local machine, the URL begins with
          "file://".  For remote files, graphviz must have been
          configured to use a command such as curl to retrieve the
          files remotely.  Currently unsupported

     '_z': Provides z coordinates for the node in a 3D system. Currently
          unsupported

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

     Different attributes are appropriate for different specific graph
     layout algorithms. Graphviz supports three different layout
     algorithms, dot, neato and twopi.

     There is some tension between attributes that graphviz supports
     and those that we can support at the R level. Please let us know
     if there are situations that are not being handled appropriately.

     All attributes are passed down to graphviz. However they can be
     later modified for rendering in R.

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

     Jeff Gentry

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.research.att.com/~erg/graphviz/info/attrs.html>

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

     'plot.graph', 'agopen', 'GraphvizLayouts'

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

