Re: How to rescale the x-axis in an nonlinear way?
- To: mathgroup at smc.vnet.net
- Subject: [mg112417] Re: How to rescale the x-axis in an nonlinear way?
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Wed, 15 Sep 2010 04:36:57 -0400 (EDT)
- References: <i6necd$g7u$1@smc.vnet.net>
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