这是我迄今为止的代码。
\documentclass[a4paper,12pt]{article}
\usepackage{tikz,pdftexcmds}
\begin{center}
\begin{tikzpicture}[scale=.7]
\mycirc/.style={circle,fill=blue!20, minimum size=0.5cm}
\coordinate [label={below right:(1.plads \, 2.plads \, 3.plads)}] (A) at (0, 0);
\coordinate [label={above right:$5$ bolde}] (B) at (0, 3);
\coordinate [label={below left:$\mymk{1,2,3,4,5}$ bolde}] (C) at (-5, 0);
\node[mycirc,label=left:{$x$}] (n1) at (0,0) {};
% \draw[color=red, ultra thick,-latex] (A) --> (B);
\draw [very thick,-latex] (-4,0) -- (0,0);
% \draw [very thick,-latex] (0,4) -- (-3,0);
% \draw [very thick,-latex] (0,3) -- (0,0);
\end{tikzpicture}
\end{center}
\end{document}
答案1
下面手动绘制并定位所有内容,但看起来有点像您的图表。
\documentclass[border=3.14,tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\path
(0,0)
node[draw, ellipse, text width=2cm, text centered](n) {A \\ $n$ elementer}
(-6,-2)
node[draw, ellipse, text width=2cm, text centered] (r) {$r$ elementer}
;
\begin{scope}[yshift=-4cm,xshift=-2.5cm]
\draw[dashed]
(0,0) coordinate(dt1) -- ++(5,0) coordinate(dt2) --
++(0,.7) coordinate(dt3) -- (dt1|-dt3) -- cycle
;
\foreach\x in {1,...,4}
\draw[dashed] (dt1) ++(\x,0) -- ++(0,.7);
\node at (3.5,.35) {\ldots};
\foreach[count=\n]\x in {0,1,2}
\node (tt\n) at (\x+0.5,1) {\n. pl};
\node at (4.5,1) {$r$'te pl};
\end{scope}
\draw[->,>=stealth]
(n) --node[above left]{Valg $1$}node[below right]{$x$} (r)
;
\draw[->,>=stealth]
(r) --node[above right]{$r!$}node[below left]{Valg $2$} (-2.5,-3.65);
\draw[->,>=stealth]
(n) --node[right]{$\frac{n!}{(n-r)!}$ udfyldninger} (tt3);
\end{tikzpicture}
\end{document}