tikz 中的比例图

tikz 中的比例图

我一直在尝试在 Latex 中包含下图中的图表,我可以使用表格环境实现图中的结果。但是,我想知道是否可以通过 Tikz 实现相同的结果。我试过了,但没有成功。感谢您的任何建议!

\documentclass{article}

\usepackage[T1]{fontenc} %font

\usepackage{arydshln}

\begin{document} 

\begin{table}[]

\begin{tabular}{lllllll}

&   \multicolumn{1}{|c}{}   &    &   &   & & \\

 Acc  &     \multicolumn{1}{|c}{Erg} &   &   &   &   &   \\

 &   \multicolumn{1}{|c}{}   & \multicolumn{1}{|c}{}   &   &   & & \\

\cline{2-2}

&  \multicolumn{1}{|c}{}   &  \multicolumn{1}{|c}{} &  &   &     &  \\

+tu  &     \multicolumn{1}{|c}{}  -tu  &       \multicolumn{1}{|c}{}  &    &  &    &    \\

  &   &    \multicolumn{1}{|c}{}    &   \multicolumn{1}{|c}{}    &  &   &  \\

 \cline{3-3}

 &   &    \multicolumn{1}{|c}{}   &   \multicolumn{1}{|c}{}     &     &     &   \\

&  \multicolumn{1}{l}{} +ego  &  \multicolumn{1}{|c}{} -ego &  \multicolumn{1}{|c}{} &  &  &      `pronouns'   \\ 

 &  &   &  \multicolumn{1}{|c}{}  &  \multicolumn{1}{|c}{} &  &  \\

\hdashline

 \cline{4-4}

 & &  &  \multicolumn{1}{|c}{}  &  \multicolumn{1}{|c}{} &   &    \\ 

 &  &  \multicolumn{1}{l}{}  +proper &  \multicolumn{1}{|c}{}  -proper &   
\multicolumn{1}{|c}{}   &     & `nouns'    \\

 &     &    &     &   \multicolumn{1}{|c}{}  &   \multicolumn{1}{|c}{}  & \\

\cline{5-5}

 &     &    &    &      \multicolumn{1}{|c}{}     &    \multicolumn{1}{|c}{}    &  \\

 &  &  &  \multicolumn{1}{l}{}  +human  &  \multicolumn{1}{|c}{} -human  &   
\multicolumn{1}{|c}{}  &    \\

 &     &        &  &    &    \multicolumn{1}{|c}{}  &    \\

 \cline{6-6}

 &     &   &   &  \multicolumn{1}{l}{} +animate &  \multicolumn{1}{|c}{}  -animate &   \\

 &     &   &   &    &   \multicolumn{1}{|c}{}   &  \\

  &     &   &   &    & \multicolumn{1}{|c}{}  …  &           

\end{tabular}

\end{table}

\end{document} 

在此处输入图片描述

答案1

无需任何附加软件包,您就可以执行类似这样的操作。参数\a\b可以根据需要进行调整。

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=0.8]
    \def\a{2}
    \def\b{3}
    \foreach \i in {0,...,4}{
    \draw[thick] (\b*\i,-\a*\i)--(\b*\i,-\a*\i-2*\a)(\b*\i,-\a*\i-\a)--(\b*\i+\b,-\a*\i-\a);
    };
    \draw[dashed] (-\b,-3*\a)--(5.5*\b,-3*\a);
    
    \node[below left] at (0,0) {Acc};
    \node[below right] at (0,0) {Erg};
    \node[left] at (0,-0.5*\a-\a) {+tu};
    
    \node[left] at (\b,-0.5*\a-\a) {-tu};
    \node[left] at (\b,-0.5*\a-2*\a) {+ego};

    \node[left] at (2*\b,-0.5*\a-2*\a) {-ego};
    \node[left] at (2*\b,-0.5*\a-3*\a) {+proper};
    
    \node[left] at (3*\b,-0.5*\a-3*\a) {-proper};
    \node[left] at (3*\b,-0.5*\a-4*\a) {+human};
    
    \node[left] at (4*\b,-0.5*\a-4*\a) {-human};
    \node[left] at (4*\b,-0.5*\a-5*\a) {+animate};

    \node[left] at (5*\b,-0.5*\a-5*\a) {-animate};
    \node[left] at (5*\b,-0.5*\a-5.5*\a) {\ldots};

    \node[above left] at (5.5*\b,-3*\a) {'pronouns`};
    \node[below left] at (5.5*\b,-3*\a) {'nouns`};
   
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容