是否可以在 tikz 中绘制此图像?

是否可以在 tikz 中绘制此图像?

在此处输入图片描述

问题:请推荐一些在线工具来绘制此图像。是否可以使用 tikz 绘制此图像?如果可以,如何绘制?

我的代码:

\usepackage{tikz}
\begin{document}
\draw (2,2) ellipse (3cm and 1cm);
\draw (2,6) ellipse (3cm and 1cm);

\draw (2,8) ellipse (3cm and 1cm);
\draw (2,10) ellipse (3cm and 1cm);
\end{document}

答案1

outer sep在阅读@Zarko 的回答后,我将其添加到了“整个”节点。

\documentclass[border=1mm,tikz]{standalone}
\usetikzlibrary{shapes,positioning}
\usetikzlibrary{backgrounds}
\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

\begin{document}
\tikzset{set/.style={thick, draw,ellipse, minimum width=100pt,minimum
height=0.8cm,inner sep=0pt,    align=center}}
\begin{tikzpicture}
\node[set,double,double distance=5pt,postaction={draw},inner sep=2.5pt,
outer sep=2pt] (whole)
 {Whole group $\{1,-1,i,-i,-j,-j,k,-k\}$};
\node[set,below=1.2cm of whole] (normalj) {$\{1,-1,j,-j\}$};
\node[set,left=0.6cm of normalj] (normali) {$\{1,-1,i,-i\}$};
\node[set,right=0.6cm of normalj] (normalk) {$\{1,-1,k,-k\}$};
\node[set,double,double distance=2pt,inner sep=1pt,below=1.2cm of normalj]
(center) {$\{1,-1\}$, characteristic, center,
commutator subgroup};
\node[set,below=1.2cm of center,double,double distance=5pt,postaction={draw},inner sep=2.5pt] 
(trivial){Trivial subgroup};
\begin{pgfonlayer}{background}
\draw[ultra thick,latex-] (whole.south west) -- (normali);
\draw[ultra thick,latex-] (whole) -- (normalj);
\draw[ultra thick,latex-] (whole.south east) -- (normalk);
\draw[ultra thick,-latex] (center.north west) -- (normali);
\draw[ultra thick,-latex] (center.north) -- (normalj);
\draw[ultra thick,-latex] (center.north east) -- (normalk);
\draw[ultra thick,latex-] (center.south) -- (trivial.north);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

当 OP 添加tikz-trees标签时,他可能要求提供树形解决方案:

\documentclass[border=5mm,tikz]{standalone}
\usetikzlibrary{shapes,trees}

\begin{document}

\begin{tikzpicture}[grow=up,sibling distance=60mm,-latex,shorten >=1mm,
 every node/.style={draw, ellipse}, 
 triple/.append style={double,double distance=1.8pt,postaction={draw}}]

\node[triple] at (2,2) {Trivia subgroup $\{1\}$}
 child { node[double] {$\{1,-1\}$, characteristic, center, commutator subgroup} 
  child { node (nk) {$\{1,k,-1,-k\}$, normal} }
  child { node {$\{1,j,-1,-j\}$, normal} 
   child { node[triple] (w) {Whole group $\{1,-1,i,-i,j,-j,k,-k\}$} } }
  child { node (ni) {$\{1,i,-1,-i\}$, normal} } };

\draw[shorten >=2.5mm] (ni) -- (w);
\draw[shorten >=2.5mm] (nk) -- (w);

\end{tikzpicture}

\end{document}

在此处输入图片描述

答案3

作为锻炼和证明土拨鼠我不冬眠:-)

在此处输入图片描述

基于土拨鼠的回答一些小的改变,目标是使图像代码稍微更短更简洁:

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{arrows.meta, shapes, positioning}

\begin{document}
    \begin{tikzpicture}[
node distance = 12mm and 6mm,
   set/.style = {ellipse, draw, thick,
                 minimum size=12 mm,
                 inner xsep=#1, outer sep=1pt},
   set/.default = -1ex,
  dset/.style = {set=#1, double, double distance=4pt},
                        ]
\node[dset, postaction={draw}]  (whole)     {Whole group $\{1,-1,i,-i,-j,-j,k,-k\}$};
\node[set,below=of whole]       (normalj)   {$\{1,-1,j,-j\}$};
\node[set, left=of normalj]     (normali)   {$\{1,-1,i,-i\}$};
\node[set,right=of normalj]     (normalk)   {$\{1,-1,k,-k\}$};
\node[dset=-4ex,below=of normalj]  (center) {$\{1,-1\}$,
                                              characteristic, center,
                                              commutator subgroup};
\node[dset, postaction={draw},
      below=of center]          (trivial)   {Trivial subgroup};
    \begin{scope}[shorten <=3pt, shorten >=3pt, ultra thick, -Latex]
\draw   (normalj) edge (whole)
        (normali) edge (whole)
        (normalk) edge (whole)
        (center)  edge (normali)
        (center)  edge (normalj)
        (center)  edge (normalk)
        (trivial)   to  (center);
    \end{scope}
\end{tikzpicture}
\end{document}

答案4

psmatrix为了好玩,使用椭圆节点来解决环境问题:

\documentclass[border=3pt]{standalone}
\usepackage{mathtools, adjustbox}
\DeclarePairedDelimiter{\set}\{\}
\usepackage{pst-node, auto-pst-pdf} %% to compile with pMiKTeX) or pdflatex --shell-escape (TeX Live, MacTeX)

\begin{document}

\def\psrowhookiii{\psset{doubleline = true}}
\def\pscolhookii{\hskip -2.5cm}\def\pscolhookiii{\hskip -2.5cm}
\begin{psmatrix}[mnode = oval, rowsep = 1cm]
%%% Matrix nodes
& [name = W] \adjustbox{padding = -2.91em -1.92ex -2.91em -1.92ex}{\psovalbox[doubleline]{\adjustbox{padding = -2.2em 1.5ex -2.2em 1.5ex}{Whole group $\set[\big]{1,-1,i, -i, j, -j, k, -k}$}}} \\
[name = I] \adjustbox{padding = -0.6em 0.8ex -0.6em 0.8ex}{$ \set[big]{1,-1,i, -i} $} & [name = J] \adjustbox{padding = -0.6em 0.8ex -0.6em 0.8ex}{$ \set[big]{1,-1,j, -j} $} & [name = K] $ \adjustbox{padding = -0.6em 0.8ex -0.6em 0.8ex}{\set[big]{1,-1,k, k} $} \\
& [name = C] \makebox[3.8cm]{\set[\big]{-1,1} \begin{tabular}{l}characteristic, center, \\commutator subgroup\end{tabular}} \\
& [name = T] \adjustbox{padding = -1.38em -1.75ex -1.38em -1.75ex}{\psovalbox[doubleline]{\adjustbox{padding = -1em 1.5ex -1em 1.5ex}{Trivial subgroup}}}
%%% Connections
\foreach \start/\target in {T/C, C/I, C/J, C/K , I/W, J/W, K/W}{\ncline[arrows = ->, arrowinset = 0.12]{\start}{\target}}
\end{psmatrix}

\end{document} 

在此处输入图片描述

相关内容