在 tikz 中绘制插图

在 tikz 中绘制插图

请告诉我,也许在 Tikz 中某个地方有类似的插图,或者如何绘制任意轮廓,其中包含文本和指向相应位置的箭头

在此处输入图片描述

首先,我尝试简单地创建形状,使用shapes.symbols,并将其移到我的 tikz 图片中,但它不能正常工作

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{shapes,backgrounds}
\usepackage{tikz}
\usetikzlibrary{shapes,backgrounds}
\usetikzlibrary{automata,positioning,shapes.geometric, arrows}
\usetikzlibrary {shapes.symbols}

\begin{document}
\begin{tikzpicture}
  \node [cloud, draw, minimum width=6cm, minimum height=4cm, shift={(5,1)}] at (12.5, 5) {ddfw};
 
\end{tikzpicture}
\end{document}

线和节点(位置 1,2,3,4)

\draw (1,2) node [anchor=north west][inner sep=0.75pt]   [align=left] {1};
% Text Node
\draw (2,2) node [anchor=north west][inner sep=0.75pt]   [align=left] {2};
% Text Node
\draw (3,2) node [anchor=north west][inner sep=0.75pt]   [align=left] {3};
% Text Node
\draw (4,2) node [anchor=north west][inner sep=0.75pt]   [align=left] {4};

因此,还需要了解为什么云移不起作用以及箭头的起点和终点的位置是什么……因此,我现在会继续思考

更新:

我尝试画这个,但是如果手动画这些箭头和形状,最终结果会很糟糕......

如果我使用@MS-SPO 建议,我就无法正确绘制形状和箭头,但我想,我可能可以自动绘制箭头和节点......

\begin{tikzpicture}
  \node (A) at (0.6,-1.1) {1};
  \node (B) at (1.4,-1.1) {2};
  \node (C) at (2.2,-1.1) {3};
  \node (D) at (3.0,-1.1) {4};
   \draw[thick] (0.25,-0.65) -- (1,-0.65)  (1cm,1.5ex);
   \draw[thick] (1.1,-0.65) -- (1.7,-0.65)  (1cm,1.5ex);
   \draw[thick] (1.9,-0.65) -- (2.5,-0.65)  (1cm,1.5ex);
   \draw[thick] (2.7,-0.65) -- (3.35,-0.65)  (1cm,1.5ex);
  \draw[arrows = {Stealth[scale=2]-}] (0.5,-0.3) arc (142:90:7.2cm);
  \draw[arrows = {Stealth[scale=2]-}] (1.28,-0.3) arc (150:90:4.22cm);
  \draw[arrows = {Stealth[scale=2]-}] (2.2,-0.3) arc (150:90:2.72cm);
  \draw[arrows = {Stealth[scale=2]-}] (3,-0.3) arc (150:90:1.85cm);
  \node [cloud, aspect = 3, cloud puffs=25, draw, minimum width=7cm, minimum height=3.5cm]
    at (8, 1) {};
\end{tikzpicture}

答案1

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{hobby, arrows.meta}
\begin{document}
\begin{tikzpicture}[very thick, use Hobby shortcut]
\node (A) at (-8,-4) {1};
\node (B) at (-7,-4) {2};
\node (C) at (-6,-4) {3};
\node (D) at (-5,-4) {4};
\foreach \n in {A,B,C,D}{
  \draw[cyan!60] ([yshift=2pt]\n.north west) -- ([yshift=2pt]\n.north east);
  \draw[cyan!60, -Stealth] (0,0) to[bend right=2cm]node[black, above, sloped, pos=0.8]{36 choices} ([above=0.5cm]\n);
}
\draw[cyan!60, closed, fill=white] (3,0) \foreach \ang in {5,10,...,355}{ .. ({(3+0.4*rnd)*cos(\ang)}, {(1.5+0.4*rnd)*sin(\ang)})};
\node[align=left] {Pool of available\\symbols: A,B,C,D,E,F,G,\\H,I,J,K,L,M,N,O,P,Q,R,\\S,T,U,V,W,X,Y,Z\\0,1,2,3,4,5,6,7,8,9};
\end{tikzpicture}
\end{document}

带有文字和箭头的随机云形状

相关内容