generate graphs in background