# Picking the scale for a graph?

I have a piecewise function consisting of:

• A linear function :

$f(x)=x + 58$ if $x\le6$

• An exponential base function:

$$f(x) = 2^x\text{ if }x>6$$

The values of the exponential function are obviously much greater than those of the linear function, so how do I pick the best scale that can accurately display both functions on the same graph?

I realize that it's impossible to show both perfectly but how would you calculate the best scale? I would prefer a general solution for all situations like this (graphing sections with large differences on the same graph).

Note this doesn't only apply to piecewise functions but any functions with large diff. in values. For example try graphing the points ${0,1,2,3,4}$ from $f(x) = 10^x$. (a difference of 9999 between the first and last point!)

I am not talking about breaks. In a continuous function, I cannot show a break in scale because this gives an inaccurate model of the graph.

Also note I am referring to graphing by hand not calculators which automatically calculate the scale.

• Normally a semi-log plot is used in these cases. Jul 10, 2012 at 17:12
• Instead of plotting the function $$f(x)=\left\{\begin{array}{c}x+58\qquad \text{if }x\le 6 \\ 2^{x}\qquad \quad \quad \text{if }x> 6 \end{array} \right.$$ you might plot the function $$g(x)=\left\{ \begin{array}{c} \log _{2}\left( x+58\right) \qquad \text{if }x\le 6 \\ \log _{2}2^{x}=x\qquad \quad \text{if }x> 6 \end{array} \right.$$ Jul 10, 2012 at 17:21
– user26649
Jul 10, 2012 at 18:46
• OK, I've just posted my comments as an answer. Jul 10, 2012 at 19:16

• Instead of plotting the function $$f(x)=\left\{ \begin{array}{c} x+58\qquad \text{if }x\le 6 \\ 2^{x}\qquad \quad \quad \text{if }x> 6\end{array} \right.$$ you might plot the function
$$g(x)=\left\{ \begin{array}{c} \log _{2}\left( x+58\right) \qquad \text{if }x\le 6 \\ \log _{2}2^{x}=x\qquad \quad \text{if }x> 6. \end{array} \right.$$