Refactor graph plots response processing