Re: How to rescale the x-axis in an nonlinear way?

• To: mathgroup at smc.vnet.net
• Subject: [mg112448] Re: How to rescale the x-axis in an nonlinear way?
• From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
• Date: Wed, 15 Sep 2010 20:03:51 -0400 (EDT)
• References: <i6necd\$g7u\$1@smc.vnet.net> <i6q0ju\$l4g\$1@smc.vnet.net>

```Hi Dan,

The plot doesn't show anything for me. Looks like InverseFunction only
works for some simple functions. Using FindRoot it seems to work
better:

xinverse[i_] := x /. FindRoot[xscale[x] == i, {x, 1}]

Cheers -- Sjoerd

On Sep 15, 10:37 am, dr DanW <dmaxwar... at gmail.com> wrote:
> You have to scale the plot and the ticks manually, as in
>
> xscale = 1 + 10^#1 - E^#1 & ;
>
> xinverse = InverseFunction[xscale];
>
> Plot[Tanh[xinverse[sx]], {sx, xscale[0], xscale[1.]},
>   Ticks -> {({xscale[#1], #1} & ) /@ {0, 0.4, 0.7, 0.8, 0.9, 1},
> Automatic}]
>
> Where I am plotting the Tanh[] function on your scaled x-axis.  The
> Ticks option lets me choose where I want each tick and how to label
> them.
>
> There are hints from Wolfram in one of their video blogs that the next
> version of Mathematica will have a way of doing general axis scaling.
>
> Daniel

```

• Prev by Date: Re: Generalizing Complement to handle multiple occurrences
• Next by Date: Advice on Compile
• Previous by thread: Re: How to rescale the x-axis in an nonlinear way?
• Next by thread: Re: How to rescale the x-axis in an nonlinear way?