我怎样才能用 tikz 制作这种图表?
答案1
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\newcommand{\arr}[2]{
\draw[->] #1 -- #2;
\filldraw #1 circle(0.5pt);
}
\newcommand{\carr}[5]{
\draw[->,rotate around={#5}] #1 arc[x radius=#4cm, y radius =#4cm, start angle=#2, end angle=#3];
\filldraw #1 circle(0.5pt);
}
\begin{document}
\begin{center}
\includegraphics[scale=0.5]{graph.PNG}
\end{center}
\begin{center}
\begin{tikzpicture}[>=latex]
%Graph 1, system 1
\draw[dashed] (2.8,6.04)--(2.8,5.5);
\arr{(2.8,5.5-0.4*0)}{(2.8,5.5-0.4*1)}
\arr{(2.8,5.5-0.4*1)}{(2.8,5.5-0.4*2)}
\arr{(2.8,5.5-0.4*2)}{(2.8,5.5-0.4*3)}
\arr{(2.8,5.5-0.4*3)}{(2.8,5.5-0.4*4)}
\arr{(2.8,5.5-0.4*4)}{(2.8,5.5-0.4*5)}
\arr{(2.8,5.5-0.4*5)}{(2.8,5.5-0.4*6)}
\draw[dashed] (2.8,5.5-0.4*6)--(2.8,2.5);
\filldraw (2.8,3.1) circle(0.5pt);
%system 2
\arr{(2.3,5.15)}{(2.8,4.7)}
\arr{(2.3,5.7)}{(2.3,5.15)}
\arr{(1.8,5.3)}{(2.3,5.15)}
%system 3
\arr{(2.3,4.35)}{(2.8,3.9)}
%system 4
\arr{(3.3,3.65)}{(2.8,3.5)}
\arr{(3.3,4.25)}{(3.3,3.65)}
\arr{(3.8,3.95)}{(3.3,3.65)}
%system 5
\arr{(3.3,4.5)}{(2.8,4.3)}
\arr{(3.8,4.8)}{(3.3,4.5)}
\arr{(4.2,5.3)}{(3.8,4.8)}
\arr{(4,5.7)}{(4.2,5.3)}
\draw[dashed] (4,5.7)--(3.76,6.18);
\arr{(3.2,5)}{(3.3,4.5)}
\arr{(3.25,5.5)}{(3.2,5)}
%Graph 2, system 1
\arr{(5,4.5)}{(5.5,4.2)}
\arr{(5.4,3.59)}{(5.5,4.2)}
\arr{(5.5,4.2)}{(6,4.5)}
\draw[dashed] (5.4,3.59)--(5.3,2.98);
%system 2
\arr{(6,4.5)}{(6.5,4)}
\arr{(6.5,4)}{(7.3,4)}
\arr{(7.3,4)}{(7.5,4.65)}
\arr{(7.5,4.65)}{(6.8,5)}
\arr{(6,4.5)}{(6.8,5)}
%system 3
\arr{(6.8,5.5)}{(6.8,5)}
\arr{(6.4,6.02)}{(6.8,5.5)}
\arr{(7.2,6.02)}{(6.8,5.5)}
\filldraw (6.8,5) circle(0.5pt);
%system 4
\arr{(6.4,3.5)}{(6.5,4)}
\arr{(6,3)}{(6.4,3.5)}
\arr{(6.5,3)}{(6.4,3.5)}
%system 5
\arr{(7.5,3.5)}{(7.3,4)}
\arr{(7.3,3)}{(7.5,3.5)}
\arr{(8,3.3)}{(7.5,3.5)}
%system 6
\arr{(8.5,5)}{(8,4.7)}
\arr{(8,4.7)}{(7.5,4.65)}
\arr{(8,5.2)}{(7.5,4.65)}
\arr{(8,5.8)}{(8,5.2)}
\draw[dashed] (8,5.8)--(8,6.1);
%Graph 3, system 1
\arr{(9.5,4)}{(9.7,4.5)}
\arr{(9.7,4.5)}{(10.3,4.8)}
\arr{(10.3,4.8)}{(11,4.4)}
\arr{(11,4.4)}{(10.8,3.7)}
\arr{(10.8,3.7)}{(10,3.5)}
\arr{(10,3.5)}{(9.5,4)}
%Graph 4, system 1
\carr{(12,4)}{100}{-360+100}{0.25}{30:(12,4)}
%system 2
\arr{(13,5.5)}{(13,5)}
\arr{(13,5)}{(13,4.5)}
\arr{(13,4.5)}{(13,4)}
\filldraw (13,4) circle(0.5pt);
\draw[dashed] (13,4)--(13,3.5);
%system 3
\arr{(13.8,5.5)}{(13.8,5)}
\arr{(13.8,5)}{(13.8,4.5)}
\arr{(13.8,4.5)}{(13.8,4)}
\arr{(13.8,4)}{(13.8,3.5)}
\carr{(13.8,3.5)}{100}{-360+100}{0.25}{0:(13.8,3.5)}
\draw[dashed] (13.8,5.5)--(13.8,6);
%system 3
\arr{(14.5,5.5)}{(14.5,5)}
\arr{(14.5,5)}{(14.5,4.5)}
\arr{(14.5,4.5)}{(14.5,4)}
\arr{(14.5,4)}{(14.5,3.5)}
\filldraw (14.5,3.5) circle(0.5pt);
\draw[dashed] (14.5,5.5)--(14.5,6);
\draw[dashed] (14.5,3.5)--(14.5,3);
\end{tikzpicture}
\end{center}
\end{document}