file='file1.txt'
plot file u 1:2
log=0
bind 'ctrl-l' '\
  if (log==1) \
    unset logscale y; \
    plot file u1:2; \
    log=0; \
  else \
    set logscale y ; \
    plot file u 1:(abs($2)); \
    log=1'