Factored out some common graphing code.

Some minor code consolidation, it only affects suite graphing and the gcylc graph view.