public int getAxisWidth(Graphics g) {
		int i;
		width = 0;

		if (minimum == maximum)
			return 0;
		if (dataset.size() == 0)
			return 0;

		calculateGridLabels();

		exponent.setText(null);

		if (label_exponent != 0) {
			exponent.copyState(label);
			exponent.setText("x10^" + String.valueOf(label_exponent));
		}

		if (orientation == HORIZONTAL) {

			width = label.getRHeight(g) + label.getLeading(g);
			width += Math.max(title.getRHeight(g), exponent.getRHeight(g));

		}
		else {
			for (i = 0; i < label_string.length; i++) {
				label.setText(" " + label_string[i]);
				width = Math.max(label.getRWidth(g), width);
			}
			max_label_width = width;
			width = 0;

			if (!title.isNull()) {
				width = Math.max(width, title.getRWidth(g) + title.charWidth(g, ' '));
			}

			if (!exponent.isNull()) {
				width = Math.max(width, exponent.getRWidth(g) + exponent.charWidth(g, ' '));
			}
			width += max_label_width;
		}

		return width;
	}