 # This example shows how in gnuplot version 5 a nonlinear axis definition
# can be used to set up logscale axes. This mechanism replaces a specialcase
# logscale implementation provided by previous versions of gnuplot.
# The pair of commands
# set nonlinear x via log10(x) inverse 10**x
# set xtics log
# is equivalent to the prev5 command
# set logscale x
# The "set logscale" command is still accepted as a shortcut.
#
# This plot is the same as plot #2 in electrom.dem showing logscaled axes.
#
set title "Logscaled axes defined using 'set log'"
set label 1 "This version of the plot uses\nset logscale x\nset logscale y" at graph 0.5, 0.85, 0 center norotate back nopoint
set dummy jw, y
set grid xtics ytics
set key inside center bottom vertical Right noreverse enhanced autotitle box
set samples 160, 160
set style data lines
set xtics border out scale 1,0.5 nomirror
set ytics border out scale 1,0.5 nomirror
set ytics norangelimit 0.1 textcolor rgb "darkviolet"
set y2tics border out scale 1,0.5 nomirror
set y2tics norangelimit autofreq textcolor rgb "#56b4e9"
set xlabel "jw (radians)"
set ylabel "magnitude of A(jw)"
set y2label "Phase of A(jw) (degrees)"
#
set xrange [ 1.1 : 90000.0 ] noextend
set yrange [ 0.1 : 1.0 ]
#
set log x
set log y
set ytics nolog
#
A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2))
p1 = 10
p2 = 10000
#
plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3
Click here for minimal script to generate this plot
