This is what I mean (note the labels in the x axis):
The reason I'm looking at this problem is because I've always felt something was not right with truncated plots (e.g. of the exponential function, or functions with asymptotes) where the curve tends to infinity in one (or both) of the axes. I think it would be nice to have a plot that could contain the full range of a function, from $-\infty$ to $\infty$.
A log-log plot where the scale doesn't increase monotonically, but instead is symmetric about the origin, is close to a solution, and it can be obtained, for example, with matplotlib's "symlog" scaling option. However, such plots still need to be truncated somewhere. Ideally, to map an infinite range to a finite plot length, a sigmoid function is needed.
I could find a couple examples of this in practice, namely here and here (where I took the above image from).
At least the first of those uses the arctangent function to do the sigmoid scaling, but I wondered if there was a particular sigmoid function that is special, the same way the exponential function is the natural exponential curve. I didn't know exactly how to evaluate that, so I looked at these options and picked the one with the simplest mathematical representation: $\frac{x}{|x|+1}$.
Since the scaling was applied to both the x and y axes, this resulted in a nice plot for $f(x)=x$, as expected:
but the plot for $f(x)=x^2$ wasn't as alike the original one near the extremes:
and particularly the plot for $f(x)=e^x$ had a peculiar shape I wished was closer to the original (i.e. plotted in a linear scale):
It looks like the slope of the sigmoid function I chose eventually surpasses that of the exponential function, so instead of approaching infinity from the bottom (so we can see that $y$ grows faster than $x$), it approaches it from the left, making it look that at some point $x$ starts to grow faster than $y$.
I tried the other sigmoid functions mentioned in the image above, but they had the same effect, or worse, in the shape of the exponential. So my question is: is there a way to compress the infinite range of a function into a finite length of a plot that allows preserving the overall shape of the exponential function (and hopefully others too)?
Additionally, I'd appreciate if you could also tell me whether there is a "natural" sigmoid function, or at least what you would consider to be the best approximation of such a thing.