@Override
	protected void run() throws Exception {
		PluginTool tool = getState().getTool();
		GraphDisplayBroker service = tool.getService(GraphDisplayBroker.class);
		GraphDisplay display = service.getDefaultGraphDisplay(false, monitor);
		generateGraph();
		display.setGraph(graph, "Test2", false, monitor);
	}
Script to generate graph to test BrandesKopf algorithm
Ghidra/Features/Base/developer_scripts/GenerateBrandesKopfGraphScript.java