\tikzset{block/.default={0.8cm}{0.6cm}}
\tikzset{addb/.append style={scale=0.7}}
\tikzset{node distance=0.6}
\def\cdist{0.7}

\definecolor{T}{rgb}{0.230, 0.299, 0.754}%
\definecolor{S}{rgb}{0.706, 0.016, 0.150}%
\setlength\fwidth{7cm}
\setlength\fheight{4cm}

\begin{tikzpicture}
  \begin{axis}[%
    name=axis,
    width=\fwidth,
    height=\fheight,
    at={(0, 0)},
    xmode=log,
    xmin=0.1,
    xmax=1000,
    xminorticks=true,
    xlabel={Frequency [Hz]},
    ymode=log,
    ymin=0.001,
    ymax=10,
    yminorticks=true,
    ylabel={Magnitude},
    axis background/.style={fill=white},
    xminorgrids,
    yminorgrids
    ]
    \addplot [color=T, line width=1.5pt, forget plot, upperbound]
    table[row sep=crcr]{%
      0.1	4.7609074288834\\
      0.457784053837662	4.74112847250108\\
      0.781435060784454	4.70208061093208\\
      1.0991097009295	4.64559165613624\\
      1.42283045721435	4.57144906349989\\
      1.75891659032773	4.47927616460061\\
      2.09566239948043	4.37423445322045\\
      2.45126006203334	4.25274519592358\\
      2.8408836901833	4.11095719445138\\
      3.26222200971167	3.95170788088451\\
      3.71167181947577	3.77948905141281\\
      4.18428850790158	3.59988757314696\\
      4.71708469091702	3.40317136463527\\
      5.31772317785097	3.19223684289429\\
      5.99484250318941	2.97087790006113\\
      6.82077673286568	2.72585419958062\\
      7.76050333513357	2.47949503869403\\
      8.9114823228402	2.2201435349723\\
      10.3279473191895	1.95491825546796\\
      12.0804213467733	1.69160934903556\\
      14.3932264471941	1.42447068049222\\
      17.3076553419573	1.17667603248786\\
      21.1995345753607	0.943491337665097\\
      26.2070669648385	0.740920673515988\\
      32.6974974451177	0.569453372601831\\
      41.1731993116168	0.427919272009563\\
      51.8459354389291	0.317863515154134\\
      65.8898955079995	0.230558428152838\\
      85.2964449974102	0.1611173349527\\
      114.566872863487	0.105607825522203\\
      228.74908173557	0.0390036255196556\\
      272.543253128103	0.0307810979565345\\
      315.863540826782	0.025500739341156\\
      359.381366380463	0.0218605610825003\\
      405.142317111465	0.0191453206052172\\
      452.538627817017	0.0171066280251345\\
      505.479682119124	0.0154393411147139\\
      559.432570616938	0.0141825204910006\\
      619.144175597784	0.0131421696026314\\
      685.229159528406	0.012282656024432\\
      758.367791499719	0.0115737646620205\\
      847.08682665574	0.0109423524789141\\
      946.1848194722	0.0104322816237634\\
      1000	0.0102154679782451\\
    };
    \addplot [color=T, line width=1.5pt, forget plot, upperbound]
    table[row sep=crcr]{%
      20	0.7\\
      50	0.7\\
    };
    \addplot [color=T, line width=1.5pt, forget plot, upperbound]
    table[row sep=crcr]{%
      50	0.1\\
      500	0.1\\
    };
    \addplot [color=T, line width=1.5pt, forget plot, upperbound]
    table[row sep=crcr]{%
      500	0.01\\
      1000	0.01\\
    };
    \addplot [color=S, line width=1.5pt, forget plot, upperbound]
    table[row sep=crcr]{%
      0.02	1e-05\\
      2	0.1\\
    };
    \addplot [color=T, dashed, line width=1.5pt, forget plot]
    table[row sep=crcr]{%
      0.1	4.76100991590828\\
      0.479380849508911	4.74142527327249\\
      0.818300681586739	4.70271823354146\\
      1.15096220088503	4.64622189875955\\
      1.47628147190939	4.57452203442608\\
      1.80824493487795	4.48620448383121\\
      2.15443469003188	4.37981637168679\\
      2.49687842888433	4.26245362773302\\
      2.86719649749377	4.1246194153153\\
      3.23228397818138	3.98033166957675\\
      3.61041859717334	3.82486484671119\\
      4.03278998219371	3.64713653765075\\
      4.4632339267104	3.4647619825248\\
      4.93962174387832	3.26480194796314\\
      5.46685729972018	3.04925839907739\\
      6.05036787939122	2.82113529913371\\
      6.69616005485322	2.58433297473304\\
      7.41088151564157	2.34341563310535\\
      8.2018894992022	2.10327517992625\\
      9.07732652521023	1.86874101690569\\
      10.1392540755882	1.62441576093477\\
      11.4303112911448	1.37851305256105\\
      13.0051125217341	1.14008905236091\\
      14.9339321612425	0.917854238055838\\
      17.4679621512725	0.707763275334409\\
      20.8122156998634	0.521723677525708\\
      25.7282596744793	0.355127638575637\\
      33.3060034362459	0.218852355295698\\
      47.7176094893875	0.109683242413354\\
      119.971773543588	0.0185302783860461\\
      155.307057393346	0.011476348897964\\
      190.230118866894	0.00798799480050497\\
      226.649807927369	0.00592480300553732\\
      265.108360190854	0.00460058967167214\\
      304.42722120643	0.00373107031932976\\
      346.369417737173	0.00310997571143914\\
      390.473523688556	0.00266040632221317\\
      436.153778920801	0.0023309089597649\\
      482.707096560318	0.00208663214807546\\
      534.229329953835	0.00188718187213126\\
      591.250841383188	0.00172433492968875\\
      654.358601888324	0.00159137569438841\\
      724.202233460732	0.00148282003877247\\
      801.50069615654	0.00139418971090831\\
      887.04968896544	0.0013218279786433\\
      990.82280990038	0.00125794881012626\\
      1000	0.00125323629492883\\
    };
    \addplot [color=S, dashed, line width=1.5pt, forget plot]
    table[row sep=crcr]{%
      0.203380030584698	0.000989777819887578\\
      0.449420266211914	0.0047942767347441\\
      5.12518692705333	0.622210572704616\\
      20.6212180399914	10.0725642635729\\
    };
  \end{axis}
  \begin{customlegend}[legend cell align=left, %<= to align cells
    legend entries={ % <= in the following there are the entries
      ${w_L}^{-1}$,
      ${w_H}^{-1}$,
    },
    legend style={at={(axis.north east)}, anchor=north east, outer sep=5pt, font=\footnotesize}]
    \addlegendimage{dashed, S}
    \addlegendimage{dashed, T}
  \end{customlegend}
\end{tikzpicture}
