Commit b85e6355 by 单韦乔

合并分支 'shanweiqiao' 到 'caorunzhe'

Shanweiqiao

查看合并请求 !76
parents 435a4f06 cc6edcac
......@@ -44,21 +44,21 @@
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt44) at (n44.east) {\small{{\color{white} \textbf{-0.1}}}};
\node[anchor=south,unit,text=red] (w4) at ([yshift=0.5em]n41.north){$w_4$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick,dotted] (n11.east) -- (n21.west);
% \draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick,dotted] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\draw[->,ublue,very thick,dotted] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick,dotted] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick,dotted] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n35.west);
% \draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\draw[->,ublue,very thick] (pt31.south) -- (n41.west);
\draw[->,ublue,very thick] (pt32.south) -- (n42.west);
\draw[->,ublue,very thick] (pt34.south) -- (n43.west);
\draw[->,ublue,very thick] (pt35.south) -- (n44.west);
\draw[->,ublue,very thick,dotted] (pt31.south) -- (n41.west);
\draw[->,ublue,very thick,dotted] (pt32.south) -- (n42.west);
\draw[->,ublue,very thick,dotted] (pt34.south) -- (n43.west);
\draw[->,ublue,very thick,dotted] (pt35.south) -- (n44.west);
% \draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em]n11.west) -- (n11.east) -- (n22.west) -- (pt22.south) -- (n36.west) -- ([xshift=1em]pt36.south);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em]n11.west) -- (n11.west);
......
......@@ -28,12 +28,12 @@
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt36) at (n36.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n34.north){$w_3$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick,dotted] (n11.east) -- (n21.west);
% \draw[->,ublue,very thick,dashed] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick,dotted] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n35.west);
% \draw[->,ublue,very thick,dashed] (pt22.south) -- (n36.west);
% \draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em]n11.west) -- (n11.east) -- (n22.west) -- (pt22.south) -- (n36.west) -- ([xshift=1em]pt36.south);
......@@ -42,4 +42,10 @@
\draw[->,red,ultra thick,opacity=0.7,line width=2pt](pt22.south) -- (n36.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt](pt36.south) -- ([xshift=1em]pt36.south);
%\begin{pgfonlayer}{background}
% \node [rectangle,inner sep=0.2em,rounded corners=3pt,very thick,dashed,fill=red!40] [fit = (n11)] (box1) {};
% \node [rectangle,inner sep=0.2em,rounded corners=3pt,dotted,fill=red!40] [fit = (n22) (pt22)] (box2) {};
% \node [rectangle,inner sep=0.2em,rounded corners=3pt,very thick,dotted,fill=red!40] [fit = (n36) (pt36)] (box3) {};
%\end{pgfonlayer}
\end{tikzpicture}
\ No newline at end of file
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}%画图中的属性如xshift应该是通用的,前面的关键字如xlabel规定了修改的部分
\begin{tikzpicture}
\begin{axis}[
width=10cm, height=4.5cm,
symbolic x coords={未抽取词,do,want,what,am,people,look},%自定义x坐标
xtick=data,%自定义x坐标
symbolic x coords={未抽取词,do,want,what,am,people,look},
xtick=data,
ytick={0,0.05,0.1,0.15,0.2,0.25},
xlabel={低概率词汇},
ylabel={词汇概率},
legend pos=outer north east,%图标位置
legend pos=outer north east,
xlabel style={align=right,xshift=5.3cm,yshift=0.8cm,font=\footnotesize},
ylabel style={rotate=-90,yshift=2cm,xshift=1cm,font=\footnotesize},
y tick style={opacity=0},%隐藏y轴刻度线
x tick style={opacity=0},%隐藏x轴刻度线
y tick style={opacity=0},
x tick style={opacity=0},
x tick label style={anchor=base,font=\footnotesize,yshift=-0.5cm},
y tick label style={font=\footnotesize,/pgf/number format/.cd,fixed,precision=2},%y轴精度,不用科学表示
y axis line style={opacity=0},%隐藏y轴
tick align=inside,%原本的横行线
ymajorgrids,%显示横行网格线
axis x line*=bottom,%显示x轴坐标汉字(应该是对齐)
major grid style={dotted,draw=ublue},%横行线颜色
axis on top,%网格线位于顶层
legend style={anchor=north west,font=\footnotesize},%图标格式
y tick label style={font=\footnotesize,/pgf/number format/.cd,fixed,precision=2},
y axis line style={opacity=0},
tick align=inside,
ymajorgrids,
axis x line*=bottom,
major grid style={dotted,draw=ublue},
axis on top,
legend style={anchor=north west,font=\footnotesize},
ymin=0,
ymax=0.25]
\addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)};%area legend图例显示长方形颜色
\addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)};
\addplot [ybar,bar shift=2mm,bar width=4mm,fill=red!40,draw=red!40,area legend] coordinates{(未抽取词,0.03) (do,0.062) (want,0.062) (what,0.062) (am,0.09) (people,0.122) (look,0.138)};
\legend{未平滑,平滑后}%右上图例
\legend{未平滑,平滑后}
\end{axis}
\end{tikzpicture}
......
......@@ -44,21 +44,21 @@
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt44) at (n44.east) {\small{{\color{white} \textbf{-0.1}}}};
\node[anchor=south,unit,text=red] (w4) at ([yshift=0.5em]n41.north){$w_4$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
% \draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick,dotted] (n11.east) -- (n22.west);
\draw[->,ublue,very thick,dotted] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\draw[->,ublue,very thick,dotted] (pt21.south) -- (n31.west);
% \draw[->,ublue,very thick] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick,dotted] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick,dotted] (pt22.south) -- (n36.west);
\draw[->,ublue,very thick] (pt31.south) -- (n41.west);
\draw[->,ublue,very thick] (pt32.south) -- (n42.west);
\draw[->,ublue,very thick] (pt34.south) -- (n43.west);
\draw[->,ublue,very thick] (pt35.south) -- (n44.west);
\draw[->,ublue,very thick,dotted] (pt31.south) -- (n41.west);
% \draw[->,ublue,very thick] (pt32.south) -- (n42.west);
\draw[->,ublue,very thick,dotted] (pt34.south) -- (n43.west);
\draw[->,ublue,very thick,dotted] (pt35.south) -- (n44.west);
% \draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em]n11.west) -- (n11.west) -- ([xshift=0.5em,yshift=-0.5em]n11.west) -- ([xshift=-0.5em,yshift=-0.5em]n11.east) -- (n11.east) -- (n21.west) -- ([xshift=0.5em,yshift=-0.5em]n21.west) -- ([xshift=-0.5em,yshift=-0.5em]n21.east) -- (n21.east) -- (n32.west) -- ([xshift=0.5em,yshift=-0.5em]n32.west) -- ([xshift=0.5em,yshift=-0.5em]n32.east) -- (n32.east) -- (n42.west) -- ([xshift=0.5em,yshift=-0.5em]n42.west) -- ([xshift=-0.5em,yshift=-0.5em]n42.east) -- (n42.east) -- ([xshift=1em]pt42.south);
% \draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em,yshift=-0.5em]n11.west) -- ([yshift=-0.5em]n11.east) -- (n11.east) -- ([xshift=-0.3em,yshift=-0.5em]n21.west) -- ([xshift=0.5em,yshift=-0.5em]n21.west) -- ([xshift=-0.5em,yshift=-0.5em]n21.east) -- (n21.east) -- (n32.west) -- ([xshift=0.5em,yshift=-0.5em]n32.west) -- ([xshift=-0.5em,yshift=-0.5em]n32.east) -- (n32.east) -- (n42.west) -- ([xshift=0.5em,yshift=-0.5em]n42.west) -- ([xshift=-0.5em,yshift=-0.5em]n42.east) -- (n42.east) -- ([xshift=1em]pt42.south);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论