Refactor analysis plots