如何绘制箭筒?

如何绘制箭筒?

我正在尝试绘制图形,尤其是箭筒,例如由一个顶点和一个环组成的箭筒。请问有什么简单的方法吗?(PS:不确定标签)

编辑:明确地说,箭筒不过是一个有向图,其中允许有环路和顶点之间的多个箭头。与函数图没有联系!

编辑:好的,为了清楚起见,这里有图片:

箭筒

每支箭都有名字的箭筒

一个循环

所以你会看到有顶点,顶点之间有箭头,顶点和箭头都用字母命名。你可以让箭头的起点和终点都相同(但这种情况并不那么重要,如果不可行也没关系)。

答案1

以下是一些示例,可重现关于代数表示的一些注释

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

Example 3
\[
\begin{tikzcd}
1 \arrow[r,"\alpha"] & 2
\end{tikzcd}
\]

Example 4
\[
\begin{tikzcd}
1 \arrow[r] & 2 \arrow[r] & \cdots \arrow[r] & n
\end{tikzcd}
\]

Example 5
\[
\begin{tikzcd}
& 2 \arrow[d] \\
1 \arrow[r] & 5 & 3 \arrow[l] \\
& 4 \arrow[u]
\end{tikzcd}
\]

Example 6
\[
\begin{tikzcd}
1 \arrow[out=0,in=90,loop]
\end{tikzcd}
\]

Example 7
\[
\begin{tikzcd}
1 \arrow[out=0,in=30,loop,swap,"\alpha_1"]
  \arrow[out=90,in=120,loop,swap,"\alpha_2"]
  \arrow[out=180,in=210,loop,swap,"\cdots"]
  \arrow[out=270,in=300,loop,swap,"\alpha_n"]
\end{tikzcd}
\]

Example 8
\[
\begin{tikzcd}
1 \arrow[r,bend left,"\alpha"] \arrow[r,bend right,swap,"\beta"] & 2
\end{tikzcd}
\]

\end{document}

在此处输入图片描述

还有两个例子

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\[
\begin{tikzcd}[arrow style=tikz,>=stealth,row sep=4em]
1 \arrow[rr,"\gamma_{13}"]
  \arrow[dr,shift left=.4ex]
  \arrow[dr,shift right=.4ex,swap,"\gamma_{12}"]
&& 2 \\
& 3 \arrow[ur,shift left=.4ex]
  \arrow[ur,shift left=1.2ex]
  \arrow[ur,shift right=.4ex]
  \arrow[ur,shift right=1.2ex,swap,"\gamma_{23}"]
\end{tikzcd}
\]

\[
\begin{tikzcd}
1 \arrow[drr,shift right=.2ex,swap,"\beta_1"] &
2 \arrow[dr,"\beta_2"] &&
3 \arrow[dl,swap,"\beta_3"] &
4 \arrow[dll,shift left=.2ex,"\beta_4"] \\
&& 5
\end{tikzcd}
\]
\end{document}

在此处输入图片描述

答案2

类似的东西,用pstricks?制作的

\documentclass[pdf]{article}
\usepackage{pstricks-add}

\begin{document}

\[ \psset{ArrowInside=->, ArrowInsidePos=0.25, arrowinset=0.25 , linewidth=0.6pt, nodesep=-1.5pt, colsep=1.2cm, offset =1ex}
\begin{psmatrix}[mnode = circle]
N & P
%%%
 \ncline{1,1}{1,2}\ncline{1,2}{1,1}\nccircle[angleA=90,nodesep=0pt]{->}{1,1}{.5cm}
\end{psmatrix}
\]
\end{document} 

在此处输入图片描述

\documentclass[pdf, x11names]{article}
\usepackage{boondox-ds}
\usepackage{pstricks-add}

\begin{document}

$ \psset{arrows=->, arrowinset=0 ,nodesep=3pt, labelsep=2pt, colsep=1.4cm, radius = 0.15, linewidth=0.3pt, fillstyle=solid, shortput=nab}
\begin{psmatrix}
    \Cnode[fillcolor=green](0,0){N} & & \Cnode[fillcolor=DeepSkyBlue3, \linewidth=0.3pt](0,0){P} \\
    & \Cnode[fillcolor=IndianRed3](0,0){R} \\
    %%
    \psset{ linewidth=0.8pt}
    \ncline{N}{P}^{\gamma_{13}}
    \nput{135}{N}{\mathbbb C^{d_1}}
    \nput{45}{P}{\mathbbb C^{d_3}}
    \nput[labelsep=4pt]{-90}{R}{\mathbbb C^{d_2}}
    \ncline[offset = 1.5pt]{N}{R}\ncline[offset=-1.5pt]{N}{R}\nbput{\gamma_{1,3}}
    \ncline[offset = 1.5pt]{R}{P}\ncline[offset=-1.5pt]{R}{P}
    \ncline[offset = 4.5pt]{R}{P}\ncline[offset=-4.5pt]{R}{P}\nbput{\gamma_{2,3}}
\end{psmatrix}
 $

\end{document} 

在此处输入图片描述

最后一个,尽可能接近你的图像:

\documentclass[pdf, x11names]{article}
\usepackage{garamondx}
\usepackage{pstricks-add}

\begin{document}

 \psset{arrows=->, arrowinset=0,nodesep=-1pt, labelsep=2pt, colsep=1.4cm, radius = 0.2, fillstyle=solid, shortput=nab}
\begin{pspicture}
    \pnode(0,0){P}
    \Cnode[linecolor =white](0,0){N}
    {\psset{doubleline, doublesep=2.5\pslinewidth, linecolor=DodgerBlue4, doublecolor=Gold4!75, angleA=180}
    \nccircle[doubleline, linecolor=DodgerBlue4, angleA=180]{-}{N}{0.7}
    \nccircle[doubleline, linecolor=DodgerBlue4, angleA=180, arrowscale =0.8 0.3]{->}{N}{0.7}}
    \nbput{\boldmath\color{IndianRed3}\itshape\bfseries x}
    \pscircle[fillcolor=DodgerBlue4!70, linecolor=red](P){0.2}
\end{pspicture}

\end{document} 

在此处输入图片描述

相关内容