Refactor plotting capacity data.