Repaired plotting function components