# Default attributes for clusters

**URL:** https://forum.graphviz.org/t/default-attributes-for-clusters/1344
**Category:** Help
**Created:** [November 3, 2022, 10:44am UTC](https://forum.graphviz.org/t/default-attributes-for-clusters/1344 "2022-11-03T10:44:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pitosalas](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/pitosalas/32/810_2.png) [@pitosalas](https://forum.graphviz.org/u/pitosalas)
#### Post date: [November 3, 2022, 10:44am UTC](https://forum.graphviz.org/t/default-attributes-for-clusters/1344/1 "2022-11-03T10:44:39Z")

</div>

I have a series of clusters that look like this:

```
subgraph cluster_theory {
    label = "Computer Science Theory"
    bgcolor="#F5FFFF"
    fontsize=30
    penwidth=0
    margin=20;
    COSI121B;
    COSI130A;
    COSI133A;
    COSI180A;
    COSI29A;
}

```

Is it possible to set those attributes once in one place, instead of repeating them with each cluster?

I’ve scoured the doc, and I can’t find it. I did see how to set default attributes for a node, but not for a cluster or subgraph,

Thanks

---

<div class="post-metadata">

### Author: ![scnorth](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/scnorth/32/89_2.png) [@scnorth](https://forum.graphviz.org/u/scnorth)
#### Post date: [November 3, 2022, 12:53pm UTC](https://forum.graphviz.org/t/default-attributes-for-clusters/1344/2 "2022-11-03T12:53:14Z")

</div>

Sure, just use `graph []` to set subgraph attributes.

```auto
graph G {
   graph [
      bgcolor="#F5FFFF"
      fontsize=30
      penwidth=0
      margin=20
   ]

```
