public void setErrorBars(int nc, double[] err){
        	if(err.length!=this.nPoints[nc])throw new IllegalArgumentException("input array of wrong length");
        	this.errorBar[nc] = true;
        	for(int i=0; i<this.nPoints[nc]; i++){
            		this.errors[nc][i] = err[i];
            		this.errorsCopy[nc][i] = err[i];
        	}
    	}