public void append(double d[], int n) throws Exception {
		double tmp[];
		int ln = n * stride;

		if (d == null || d.length == 0 || n <= 0) {
			throw new Exception("DataSet: Error in append data!");
		}

		if (data == null)
			data = new double[increment];

		// Copy the data locally.

		if (ln + length < data.length) {
			System.arraycopy(d, 0, data, length, ln);
			length += ln;
		}
		else {
			tmp = new double[ln + length + increment];

			if (length != 0) {
				System.arraycopy(data, 0, tmp, 0, length);
			}
			System.arraycopy(d, 0, tmp, length, ln);

			length += ln;
			data = tmp;
		}

		// Calculate the data range.

		range(stride);

		// Update the range on Axis that this data is attached to
		if (xaxis != null)
			xaxis.resetRange();
		if (yaxis != null)
			yaxis.resetRange();

	}