def set_xbound(self, lower=None, upper=None):
if upper is None and iterable(lower):<EOL><INDENT>lower,upper = lower<EOL><DEDENT>old_lower,old_upper = self.get_xbound()<EOL>if lower is None: lower = old_lower<EOL>if upper is None: upper = old_upper<EOL>if self.xaxis_inverted():<EOL><INDENT>if lower < upper:<EOL><INDENT>self.set_xlim(upper, lower)<EOL><DEDENT>else:<EOL><INDENT>self.set_xlim(lower, upper)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if lower < upper:<EOL><INDENT>self.set_xlim(lower, upper)<EOL><DEDENT>else:<EOL><INDENT>self.set_xlim(upper, lower)<EOL><DEDENT><DEDENT>
Set the lower and upper numerical bounds of the x-axis.
This method will honor axes inversion regardless of parameter order.