A string in the xdot format specifying an arbitrary background

type: xdot, default: <none>

During rendering, the canvas is first filled as described in the bgcolor attribute.

Then, if _background is defined, the graphics operations described in the string are performed on the canvas.

See xdot format page for more information.

Render a red square in the background
digraph G {
  _background="c 7 -#ff0000 p 4 4 4 36 4 36 36 4 36";
  a -> b
Valid on:
  • Graphs

Search the Graphviz codebase for "_background"

Last modified September 20, 2022: Update background.md: fix card (1c6f6f8)