Automatically adjust domain of graphing