Better separation between plot creation and GUI setup. Corrected ylim update.