public synchronized void setXBounds(float xmin, float xmax) {
		if (xmin >= xmax)
			throw new IllegalArgumentException("Max must be greater than min");
		xScale = getPreferredSize().width * (1.0f - clipRatio - clipRatio) / (xmax - xmin);
		if (xmin * xmax < 0.0f) {
			origin.x = (int) (-xmin * xScale + getPreferredSize().width * clipRatio);
		}
		else if (xmin >= 0 && xmax > 0) {
			origin.x = (int) (getPreferredSize().width * clipRatio - xmin * xScale);
		}
		else if (xmin < 0 && xmax <= 0) {
			origin.x = (int) (getPreferredSize().width * (1.0f - clipRatio) - xmax * xScale);
		}
		float dx = xAxis.getMax() - xAxis.getMin();
		float it = xAxis.getMajorTic() / dx;
		xAxis.setMin(xmin);
		xAxis.setMax(xmax);
		xAxis.setMajorTic(it * (xmax - xmin));
		if (recompute)
			recomputeData();
	}