# Background Image/Frame for the graph

**URL:** https://forum.graphviz.org/t/background-image-frame-for-the-graph/2232
**Category:** Help
**Created:** [June 5, 2024, 12:06pm UTC](https://forum.graphviz.org/t/background-image-frame-for-the-graph/2232 "2024-06-05T12:06:00Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)
#### Post date: [June 5, 2024, 1:50pm UTC](https://forum.graphviz.org/t/background-image-frame-for-the-graph/2232/2 "2024-06-05T13:50:35Z")

</div>

- there is the **\_background** attribute ([\_background | Graphviz](https://graphviz.org/docs/attrs/background/)), but the image has to be in the **xdot** format ([DOT | Graphviz](https://graphviz.org/docs/outputs/canon/#xdot))!
- for just a frame, you can embed your graph in a cluster & use the **peripheries** attribute ([peripheries | Graphviz](https://graphviz.org/docs/attrs/peripheries/))
- for a legend, see [Adding key or legend? - #12 by mattsmith321](https://forum.graphviz.org/t/adding-key-or-legend/351/12) or [Generate a legend with outputted decision tree figure (jupyter notebook)](https://forum.graphviz.org/t/generate-a-legend-with-outputted-decision-tree-figure-jupyter-notebook/390)
- or you can use **neato** to define a node that uses the **image** attribute(s) and place that node underneath (before) the rest of the graph

 ![p1](https://global.discourse-cdn.com/graphviz/original/2X/f/fad33cd3ee87af42ac26ae587f7f9055de1659b8.png)

---

_[View the full topic](https://forum.graphviz.org/t/background-image-frame-for-the-graph/2232)._
