Added controller for subgraph plotting