public void playPause () {

if(label=="play"){
  label="pause"; // to assign label="pause"
  _play();


}else{
  label="play";
  _pause();

Xmodplot = Xmax; // to allow user to decide maximum amplitude
}





}