set nonlinear seems to behave strangely. Consider this example to break logarithmic axes:
unset key
unset nonlinear x
unset nonlinear x2
axis_gap=1
x1min=1
x1max=3
x2min=5
x2max=20
ymin =1e-1
ymax =1e+3
dx=(x2min - x1max)
set yrange [ymin:ymax]
unset key
set xtics font ",12"
set ytics font ",12"
set y2tics font ",12"
axis_gap=1
set xrange [x1min:x2max] noreverse nowriteback
f(x) = (x <= x1max) ? log10(x) : (x < x2min) ? NaN : log10(x/(x2min/x1max)*axis_gap)
g(x) = (x <= log10(x1max)) ? 10**(x) : (x < log10(x1max*axis_gap)) ? NaN : 10**(x) + dx + log10(axis_gap)
set nonlinear x via f(x) inverse g(x)
set logscale y
set xtics (1e0 0,2e0 0,3e0 0,4e0 0,5e0 0,6e0 0,7e0 0,8e0 0,9e0 0,1e1 0,2e1 0)
plot 0 w l
Take a look at img1, in this case 3 and 5 should coincide, they do not in terms of tics but the bottom left coordinates are returned correctly. If I increase the axis_gap = 1.5 i get img2 the bottom leaft coordinates display the value that follows immediately after NaN, if I move the cursor further to the right, i get img3, very wrong relation between tics and coordinates in the bottom left. Something does not work correctly here.
I admit all this may be due to lack of understanding of nonlinear. Specifically I assume that f(x), in set nonlinear x via f(x) inverse g(x), is a map from the domain of y(x) (y(x) being the values plotted on y axis) or xrange to the space that contains distace of tics on x axis from origin (i.e. f(x) is the distance of the tic labeled x from origin, e.g. in pixels) and g(x) is the inverse map, from the space of distance of tics from origin (eg. pixels) to the space of numbers assosicated with tics positioned at x from origin).
I cannot seem to post images, the urls are:
img1 = (https://imgur.com/a/1AtlZYH)
img2 = (https://imgur.com/a/RhsvxY5)
img3 = (https://imgur.com/a/tRMmW7K)
Last edit: Leosenko 2019-02-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
set nonlinear seems to behave strangely. Consider this example to break logarithmic axes:
Take a look at img1, in this case 3 and 5 should coincide, they do not in terms of tics but the bottom left coordinates are returned correctly. If I increase the axis_gap = 1.5 i get img2 the bottom leaft coordinates display the value that follows immediately after NaN, if I move the cursor further to the right, i get img3, very wrong relation between tics and coordinates in the bottom left. Something does not work correctly here.
I admit all this may be due to lack of understanding of nonlinear. Specifically I assume that f(x), in set nonlinear x via f(x) inverse g(x), is a map from the domain of y(x) (y(x) being the values plotted on y axis) or xrange to the space that contains distace of tics on x axis from origin (i.e. f(x) is the distance of the tic labeled x from origin, e.g. in pixels) and g(x) is the inverse map, from the space of distance of tics from origin (eg. pixels) to the space of numbers assosicated with tics positioned at x from origin).
I cannot seem to post images, the urls are:
img1 = (https://imgur.com/a/1AtlZYH)
img2 = (https://imgur.com/a/RhsvxY5)
img3 = (https://imgur.com/a/tRMmW7K)
Last edit: Leosenko 2019-02-25