#!/usr/local/bin/gnuplot -persist # set terminal svg size 600,400 dynamic enhanced font 'arial,10' mousing name "nonlinear2_2" butt dashlength 1.0 # set output 'nonlinear2.2.svg' set dummy jw, y set grid nopolar set grid xtics nomxtics ytics nomytics noztics nomztics nortics nomrtics \ nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics set grid layerdefault lt 0 linecolor 0 linewidth 0.500, lt 0 linecolor 0 linewidth 0.500 set key inside center bottom vertical Right noreverse enhanced autotitle box lt black linewidth 1.000 dashtype solid set label 1 "The same plot except that 'set logscale' is replaced by\nset nonlinear x via log10(x) inverse 10**x\nset nonlinear y via log10(y) inverse 10**y" at graph 0.5, 0.85, 0 center norotate back nopoint set samples 160, 160 set style data lines set xtics border out scale 1,0.5 nomirror norotate autojustify set xtics norangelimit logscale autofreq set ytics border out scale 1,0.5 nomirror norotate autojustify set ytics norangelimit 0.1 textcolor rgb "dark-violet" set y2tics border out scale 1,0.5 nomirror norotate autojustify set y2tics norangelimit autofreq textcolor rgb "#56b4e9" set title "Log-scaled axes defined using 'set nonlinear'" set xlabel "jw (radians)" set xrange [ 1.10000 : 90000.0 ] noreverse writeback noextend set x2range [ * : * ] noreverse writeback set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set yrange [ 0.100000 : 1.00000 ] noreverse nowriteback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set nonlinear y via log10(y) inverse 10**y set nonlinear x via log10(x) inverse 10**x set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) NO_ANIMATION = 1 p1 = 10 p2 = 10000 plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3