## Link

Syntax:

         set link {x2 | y2} {via <expression1> inverse <expression2>}
         unset link

The set link command establishes a mapping between the x and x2 axes, or the y and y2 axes. expression1 maps primary axis coordinates onto the secondary axis. expression2 maps secondary axis coordinates onto the primary axis.

Examples:

         set link x

This is the simplest form of the command. It forces the x2 axis to have identically the same range, scale, and direction as the x axis. Commands set xrange, set auto x, etc will affect both the x and x2 axes. Commands set x2range, etc, will be ignored while the linkage is in effect.

         set link x2 via x**2 inverse sqrt(x)
         plot "sqrt_data" using 1:2 axes x2y1, "linear_data" using 1:2 axes x1y1

This command establishes forward and reverse mapping between the x and x2 axes. The forward mapping is used to generate x2 tic labels and x2 mouse coordinate The reverse mapping is used to plot coordinates given in the x2 coordinate system. Note that the mapping as given is valid only for x non-negative. When mapping to the y2 axis, both expression1 and expression2 must use y as dummy variable.