Graph Attributes

Attributes you can set on graphs

  • _background – A string in the xdot format specifying an arbitrary background.
  • bb – Bounding box of drawing in points. For write only.
  • beautify – Whether to draw leaf nodes uniformly in a circle around the root node in sfdp. For sfdp only.
  • bgcolor – Canvas background color.
  • center – Whether to center the drawing in the output canvas.
  • charset – Character encoding used when interpreting string input as a text label.
  • class – Classnames to attach to the node, edge, graph, or cluster’s SVG element. For svg only.
  • clusterrank – Mode used for handling clusters. For dot only.
  • colorscheme – A color scheme namespace: the context for interpreting color names.
  • comment – Comments are inserted into output.
  • compound – If true, allow edges between clusters. For dot only.
  • concentrate – If true, use edge concentrators.
  • Damping – Factor damping force motions. On each iteration, a node’s movement. For neato only.
  • defaultdist – The distance between nodes in separate connected components. For neato only.
  • dim – Set the number of dimensions used for the layout. For neato, fdp, sfdp only.
  • dimen – Set the number of dimensions used for rendering. For neato, fdp, sfdp only.
  • diredgeconstraints – Whether to constrain most edges to point downwards. For neato only.
  • dpi – Specifies the expected number of pixels per inch on a display device. For bitmap output, svg only.
  • epsilon – Terminating condition. For neato only.
  • esep – Margin used around polygons for purposes of spline edge routing. For neato only.
  • fontcolor – Color used for text.
  • fontname – Font used for text.
  • fontnames – Allows user control of how basic fontnames are represented in SVG output. For svg only.
  • fontpath – Directory list used by libgd to search for bitmap fonts.
  • fontsize – Font size, in points, used for text.
  • forcelabels – Whether to force placement of all xlabels, even if overlapping.
  • gradientangle – If a gradient fill is being used, this determines the angle of the fill.
  • href – Synonym for URL. For map, postscript, svg only.
  • id – Identifier for graph objects. For map, postscript, svg only.
  • imagepath – A list of directories in which to look for image files.
  • inputscale – Scales the input positions to convert between length units. For neato, fdp only.
  • K – Spring constant used in virtual physical model. For fdp, sfdp only.
  • label – Text label attached to objects.
  • label_scheme – Whether to treat a node whose name has the form |edgelabel|* as a special node representing an edge label. For sfdp only.
  • labeljust – Justification for graph & cluster labels.
  • labelloc – Vertical placement of labels for nodes, root graphs and clusters.
  • landscape – If true, the graph is rendered in landscape mode.
  • layerlistsep – The separator characters used to split attributes of type layerRange into a list of ranges.
  • layers – A linearly ordered list of layer names attached to the graph.
  • layerselect – Selects a list of layers to be emitted.
  • layersep – The separator characters for splitting the layers attribute into a list of layer names.
  • layout – Which layout engine to use.
  • levels – Number of levels allowed in the multilevel scheme. For sfdp only.
  • levelsgap – strictness of neato level constraints. For neato only.
  • lheight – Height of graph or cluster label, in inches. For write only.
  • linelength – How long strings should get before overflowing to next line, for text output.
  • lp – Label center position. For write only.
  • lwidth – Width of graph or cluster label, in inches. For write only.
  • margin – For graphs, this sets x and y margins of canvas, in inches.
  • maxiter – Sets the number of iterations used. For neato, fdp only.
  • mclimit – Scale factor for mincross (mc) edge crossing minimiser parameters. For dot only.
  • mindist – Specifies the minimum separation between all nodes. For circo only.
  • mode – Technique for optimizing the layout. For neato only.
  • model – Specifies how the distance matrix is computed for the input graph. For neato only.
  • mosek – Whether to use the MOSEK constraint solver. For neato only.
  • newrank – Whether to use a single global ranking, ignoring clusters. For dot only.
  • nodesep – In dot, nodesep specifies the minimum space between two adjacent nodes in the same rank, in inches.
  • nojustify – Whether to justify multiline text vs the previous text line (rather than the side of the container).
  • normalize – normalizes coordinates of final layout. For neato, fdp, sfdp, twopi, circo only.
  • notranslate – Whether to avoid translating layout to the origin point. For neato only.
  • nslimit – Sets number of iterations in network simplex applications. For dot only.
  • nslimit1 – Sets number of iterations in network simplex applications. For dot only.
  • oneblock – Whether to draw circo graphs around one circle. For circo only.
  • ordering – Constrains the left-to-right ordering of node edges. For dot only.
  • orientation – node shape rotation angle, or graph orientation.
  • outputorder – Specify order in which nodes and edges are drawn.
  • overlap – Determines if and how node overlaps should be removed. For fdp, neato only.
  • overlap_scaling – Scale layout by factor, to reduce node overlap. For prism, neato, sfdp, fdp, circo, twopi only.
  • overlap_shrink – Whether the overlap removal algorithm should perform a compression pass to reduce the size of the layout. For prism only.
  • pack – Whether each connected component of the graph should be laid out separately, and then the graphs packed together.
  • packmode – How connected components should be packed.
  • pad – Inches to extend the drawing area around the minimal area needed to draw the graph.
  • page – Width and height of output pages, in inches.
  • pagedir – The order in which pages are emitted.
  • quadtree – Quadtree scheme to use. For sfdp only.
  • quantum – If quantum > 0.0, node label dimensions will be rounded to integral multiples of the quantum.
  • rankdir – Sets direction of graph layout. For dot only.
  • ranksep – Specifies separation between ranks. For dot, twopi only.
  • ratio – Sets the aspect ratio (drawing height/drawing width) for the drawing.
  • remincross – If there are multiple clusters, whether to run edge crossing minimization a second time. For dot only.
  • repulsiveforce – The power of the repulsive force used in an extended Fruchterman-Reingold. For sfdp only.
  • resolution – Synonym for dpi. For bitmap output, svg only.
  • root – Specifies nodes to be used as the center of the layout. For twopi, circo only.
  • rotate – If rotate=90, sets drawing orientation to landscape.
  • rotation – Rotates the final layout counter-clockwise by the specified number of degrees. For sfdp only.
  • scale – Scales layout by the given factor after the initial layout. For neato, twopi only.
  • searchsize – During network simplex, the maximum number of edges with negative cut values to search when looking for an edge with minimum cut value. For dot only.
  • sep – Margin to leave around nodes when removing node overlap. For fdp, neato only.
  • showboxes – Print guide boxes for debugging. For dot only.
  • size – Maximum width and height of drawing, in inches.
  • smoothing – Specifies a post-processing step used to smooth out an uneven distribution of nodes. For sfdp only.
  • sortv – Sort order of graph components for ordering packmode packing.
  • splines – Controls how, and if, edges are represented.
  • start – Parameter used to determine the initial layout of nodes. For neato, fdp, sfdp only.
  • style – Set style information for components of the graph.
  • stylesheet – A URL or pathname specifying an XML style sheet, used in SVG output. For svg only.
  • target – If the object has a URL, this attribute determines which window of the browser is used for the URL. For map, svg only.
  • TBbalance – Which rank to move floating (loose) nodes to. For dot only.
  • tooltip – Tooltip (mouse hover text) attached to the node, edge, cluster, or graph. For cmap, svg only.
  • truecolor – Whether internal bitmap rendering relies on a truecolor color model or uses. For bitmap output only.
  • URL – Hyperlinks incorporated into device-dependent output. For map, postscript, svg only.
  • viewport – Clipping window on final drawing.
  • voro_margin – Tuning margin of Voronoi technique. For neato, fdp, sfdp, twopi, circo only.
  • xdotversion – Determines the version of xdot used in output. For xdot only.
Last modified September 14, 2022: page Graph Attributes (2373968)