## Nonlinear

Syntax:

         set nonlinear <axis> via f(axis) inverse g(axis)
         unset nonlinear <axis>

[new command in version 5.2] This command is similar to the set link command except that only one of the two linked axes is visible. The hidden axis remains linear. Coordinates along the visible axis are mapped by applying g(x) to hidden axis coordinates. f(x) maps the visible axis coordinates back onto the hidden linear axis.

Example:

         set xrange [1:1000]
         set nonlinear x via log10(x) inverse 10**x

This example establishes a log-scaled x axis. It is an alternative way of achieving the effect of set log x. The hidden axis in this case has range [0:3], obtained by calculating [log10(xmin):log10(xmax)]. You must provide both the forward and inverse expressions.

Example:

         set xrange [-3:3]
         set nonlinear x via norm(x) inverse invnorm(x)

This example establishes a probability-scaled (`"`probit`"`) x axis, such that plotting the cumulative normal function Phi(x) produces a straight line plot against a linear y axis.

Example:

         logit(p) = log(p/(1-p))
         logistic(a) = 1. / (1. + exp(-a))
         set xrange [.001 : .999]
         set nonlinear y via logit(y) inverse logistic(y)
         plot logit(x)

This example establishes a logit-scaled y axis such that plotting logit(x) on a linear x axis produces a straight line plot.

Example:

         f(x) = (x <= 100) ? x : (x < 500) ? NaN : x-390
         g(x) = (x <= 100) ? x : x+390
         set xrange [0:1000] noextend
         set nonlinear x via f(x) inverse g(x)
         set xtics add (100,500)
         plot sample [x=1:100] x, [x=500:1000] x

This example creates a `"`broken axis`"`. X coordinates 0-100 are at the left, X coordinates 500-1000 are at the right, there is a small gap (10 units) between them. So long as no data points with (100 4#4 x 4#4 500) are plotted, this works as expected.