In some cases it would be helpful to know within a script whether logscale is set or not.
This originates from this question.
Of course, every time you set/ unset logscale of any axis, you could additionally set your own user-variable, e.g. USER_LOG_X = 1 or USER_LOG_X = 0 if logscale x is set or unset, respectively. The base of logscale x is already stored in the gnuplot variable GPVAL_X_LOG.
Without knowing what's going on behind the scenes...
Why not using the existing gnuplot variable GPVAL_X_LOG?
GPVAL_X_LOG = NaN logscale x is not set, i.e. linear scale
GPVAL_X_LOG = 10 logscale x is set to base 10 or some other value...