Code cleanup.

Signed-off-by: Nicola Ferralis <feranick@hotmail.com>
Average plot is now correctly removed when checkbox is checked.

Signed-off-by: Nicola Ferralis <feranick@hotmail.com>
Removed redundant Re-plot button. Action replaced by the checkbox.

With code cleanup.

Signed-off-by: Nicola Ferralis <feranick@hotmail.com>