See also


@graphviz ( graphviz_parameters,...] )

Contributed by Sean Davis, with improved syntax via Jake Biesinger


Customise the graphic for each task in printed flowcharts by adding graphviz attributes, (URL, shape, colour) to that node.

  • This allows HTML formatting in the task names (using the label parameter as in the following example). HTML labels must be enclosed in < and >. E.g.

    label = "<Line <BR/> wrapped task_name()>"
  • You can also opt to keep the task name and wrap it with a prefix and suffix:

    label_suffix = "??? ", label_prefix = ": What is this?"
  • The URL attribute allows the generation of clickable svg, and also client / server side image maps usable in web pages. See Graphviz documentation

@graphviz(URL='""', fillcolor = '"#FFCCCC"',
                color = '"#FF0000"', pencolor='"#FF0000"', fontcolor='"#4B6000"',
                label_suffix = "???", label_prefix = "What is this?<BR/> ",
                label = "<What <FONT COLOR=\"red\">is</FONT>this>",
                shape= "component", height = 1.5, peripheries = 5,
def Up_to_date_task2(infile, outfile):

#   Can use dictionary if you wish...
graphviz_params = {"URL":"", "fontcolor": '"#FF00FF"'}
def myTask(input,output):


  • named graphviz_parameters

    Including among others:

    • URL (e.g. "")
    • fillcolor
    • color
    • pencolor
    • fontcolor
    • label_suffix (appended to task name)
    • label_prefix (precedes task name)
    • label (replaces task name)
    • shape (e.g. "component", "box", "diamond", "doubleoctagon" etc., see graphviz )
    • height
    • peripheries (Number of borders)
    • style (e.g. "solid", "wedged", "dashed" etc., see graphviz )

    Colours may specified as '"#FFCCCC"', 'red', 'red:blue', '/bugn9/7' etc. see color names and colour schemes