0

enter image description here

Question: Please suggest me some online-tools to draw this image. Is it possible to draw this image with tikz? If yes how?

My code:

\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}
  • 3
    Please note that this is not a we-do-it-for-you-service. Please post a MWE that shows what you've tried so far. If you haven't tried anything, take a look at the pgfmanual. This should be no problem for TikZ, you could take a look for example here to get some ideas. – Skillmon Feb 18 '18 at 14:20
  • 1
    Is it only me who finds this diagram style particular ugly? – user31729 Feb 18 '18 at 18:42
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – user36296 Jan 17 at 16:56
4

I added outer sep to the "whole" node after reading @Zarko's answer.

\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}

enter image description here

4

As OP added the tikz-trees tag, he possibly asked for a tree solution:

\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}

enter image description here

  • But it isn't a tree, so such a solution is impossible. – cfr Mar 7 '18 at 2:28
  • Why is it impossible? It may be semantically incorrect, but it yields a structure the OP wanted – Jasper Habicht Mar 7 '18 at 7:00
  • It is a good solution, I agree. It is not a tree, however. – cfr Mar 7 '18 at 18:31
4

as exercise and as proof to marmot that i don't hibernate :-)

enter image description here

based on marmot's answer with some small changes with goal that image code be slightly shorter and more concise:

\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}
  • Hi non-hibernating Zarko, your code will be even more concise once the arrow from trivial points north. (+1) – user121799 Feb 18 '18 at 16:02
  • @mar, corrected :-) – Zarko Feb 18 '18 at 16:10
3

For fun, a solution with the psmatrix environment, using oval nodes:

\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} 

enter image description here

  • This looks by far the nicest. Apparently psmatrix beats tikz hands down for ellipses. – cfr Mar 7 '18 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.