- there is the _background attribute (_background | Graphviz), but the image has to be in the xdot format (DOT | Graphviz)!
- for just a frame, you can embed your graph in a cluster & use the peripheries attribute (peripheries | Graphviz)
- for a legend, see Adding key or legend? - #12 by mattsmith321 or Generate a legend with outputted decision tree figure (jupyter notebook)
- 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