Algorithmic Solutions > LEDA > LEDA Guide > GraphWin > GraphWin File Format > Node Attributes

GraphWin File Format - Node Attributes

Node Attributes

The node attribute section contains for each node of the graph a line consisting of the following attributes (separated by blanks). More precisely, the i-th line in this section defines the attributes of the i-th node of the graph (see native graph fileformat).

  1. x-Coordinate: an attribute of type double defining the x-coordinate of the center of the node.
  2. y-Coordinate: an attribute of type double defining the y-coordinate of the center of the node.
  3. Shape: an attribute of type int defining the shape of the node. Possible values are
    • 0 (circle_node)
    • 1 (ellipse_node)
    • 2 (square_node)
    • 3 (rectangle_node)
  4. Border Color: an attribute of type int defining the color used to draw the boundary line of the node. Possible values are
    • -1 (invisible)
    • 0 (black)
    • 1 (white)
    • 2 (red)
    • 3 (green)
    • 4 (blue)
    • 5 (yellow)
    • 6 (violet)
    • 7 (orange)
    • 8 (cyan)
    • 9 (brown)
    • 10 (pink)
    • 11 (green2)
    • 12 (blue2)
    • 13 (grey1)
    • 14 (grey2)
    • 15 (grey3)
    • 16 (ivory)
  5. Border Width: an attribute of type double defining the width of the border line of the node.
  6. Radius1: an attribute of type double defining the horizontal radius of the node
  7. Radius2: an attribute of type double defining the vertical radius of the node
  8. Color: an attribute of type int defining the color used to fill the interior of the node. See color for possible values.
  9. Label Type: an attribute of type int specifying the label type. Possible values are
    • 0 ( no_label)
    • 1 ( user_label)
    • 2 ( data_label)
    • 3 ( index_label)
  10. Label Color: an attribute of type int defining the color used to draw the label of the node. See color for possible values.
  11. Label Position: an attribute of type int defining the label position. Possible values are
    • 0 ( central_pos)
    • 1 ( northwest_pos)
    • 2 ( north_pos)
    • 3 ( northeast_pos)
    • 4 ( east_pos)
    • 5 ( southeast_pos)
    • 6 ( south_pos)
    • 7 ( southwest_pos)
    • 8 ( west_pos).
  12. User Label: an attribute of type string defining the user label of the node.

Example for Node Attribute Line: Describes a circle node at position (189,260) with border color black, border width 0.5, horizontal and vertical radius 12, interior color ivory, label type index_label, label position east_pos, and an empty user label.

# x y shape b-clr b-width radius1 radius2 clr l-type l-clr l-pos l-str 
189.0 260.0 0 1 0.5 12.0 12.0 16 3 -1 4 

See also:

GraphWin

Native File Format for Graphs

GML Parser for Graphs

Graphs and Related Data Types


Manual Entries:

Manual Page GraphWin




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH