figure-self-information-function.tex 794 Bytes
Newer Older
1 2 3 4 5
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}
\begin{axis}[
  width=12cm,
  height=4cm,
单韦乔 committed
6 7
  xlabel={{$\funp{P}(x)$}},
  ylabel={{$\funp{I}(x)$}},
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  ylabel style={yshift=-1.5em,font=\footnotesize},
  xlabel style={yshift=0.3em,font=\footnotesize},
  xtick={0,0.2,...,1.0},
  ytick={0,8},
  y tick style={opacity=0},
  x tick style={opacity=0},
  domain=0.01:1,
  enlarge x limits=true,
  enlarge y limits={upper},
  legend style={draw=none},
  xmin=0,
  xmax=1,
  ymin=0,
  ymax=8,
xticklabel style={font=\small}, %坐标轴字体大小
yticklabel style={font=\small}
]
\addplot[draw=ublue,samples=100,thick] {-log2(x)};
单韦乔 committed
26
\legend{\footnotesize{$\funp{I}(x) = -\log \funp{P}(x)$}}
27 28 29 30
\end{axis}
\end{tikzpicture}

%---------------------------------------------------------------------