如何绘制图表

如何绘制图表

我想知道怎样用 LaTeX 绘制这个图表?

在此处输入图片描述

谢谢。

答案1

这是一个选项:

\documentclass[border=5pt]{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[
  >=latex,
  mydouble/.style={
    text width=12pt,
    minimum height=8pt,
    rotate=#1
  }
]
\draw
  (-1,1) rectangle (1,-1)
  (0,0) -- (45:2.4) coordinate (aux)
  ;
\draw[->]
  (0,0) -- (2,0) node[right] {$x$};
\draw[->]
  (0,0) -- (0,2) node[above] {$y$};
\node[mydouble=135,anchor=north]
 at (aux) 
 (double1) {};
\draw ([shift={(135:2pt)}]double1.east) -- ++(-45:2.2) coordinate (aux2);
\node[mydouble=45,anchor=north]
 at (aux2) 
 (double2) {};
\draw ([shift={(225:2pt)}]double2.west) -- ++(45:2) coordinate (aux3);
\node[mydouble=45,anchor=west,minimum height=20pt]
 at (aux3) 
 (double3) {};
\foreach \Value in {1,2,3}
{
  \draw 
    (double\Value.north west) -- (double\Value.north east)
    (double\Value.south west) -- (double\Value.south east);
}
  \draw 
    (double3.north west) -- (double3.south west);
\node at (0.75,0.3) {$\theta_{1}$};   
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容