# How to reduce distance between branch and cdots

I create a tree by node/child as follows:

\begin{tikzpicture}
\tikzstyle{nodestyle} = [circle,draw,minimum size=5pt]

\node [nodestyle, inner sep=0pt] {$\{X\}|_{\aleph_0}$}
child {node {$\vdots$}
child {node [nodestyle, inner sep=4pt] (a) {$X$}}
};
\path (0,0.7) node[above] {$X,X_1,X_2\in\mathcal{E}$};

\begin{scope}[xshift=2.7cm]
\node [nodestyle, inner sep=0pt] {$\{S\}|_{\aleph_0}$}
child {node {$\vdots$}
child {node [nodestyle, inner sep=3pt] (a) {$S$}
child {node [nodestyle,inner sep=0pt] {$\{X_1\}$}
child {node [nodestyle, inner sep=1pt] {$X_1$}}
}
child {node [nodestyle,inner sep=1pt] (e) {$X_2$}}
}
};

\path (0,0.7) node[above] {$S=\{\{X_1\},X_2\}$};
\end{scope}
\end{tikzpicture}


I want to set distance from branch above cdots to be same as that of below cdots. Thanks.

If you really want to use nodes for this, you may want to have a look at this snippet. (I also updated tikzstyle to tikzset.)

UPDATE: You are right. I actually never realized that dotted does not really produce dots.

SECOND UPDATE: I hope I understand your request correctly. Now the dots start 1mm below.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.shapes,calc}
\begin{document}
% from https://tex.stackexchange.com/a/52849/121799
\tikzset{decorate sep/.style 2 args=
{decorate,decoration={shape backgrounds,shape=circle,shape size=#1,shape sep=#2}}}

\begin{tikzpicture}
\tikzset{nodestyle/.style={circle,draw,minimum size=5pt}} % changed

\node [nodestyle, inner sep=0pt] {$\{X\}|_{\aleph_0}$}
child {node[minimum size=1cm] (dummy1) {}
child {node [nodestyle, inner sep=4pt] (a) {$X$}}
};
\draw[decorate sep={0.4mm}{2mm},fill] ($(dummy1.north)-(0,1mm)$) -- (dummy1.south);
\path (0,0.7) node[above] {$X,X_1,X_2\in\mathcal{E}$};

\begin{scope}[xshift=2.7cm]
\node [nodestyle, inner sep=0pt] {$\{S\}|_{\aleph_0}$}
child {node[minimum size=1cm] (dummy2) {}
child {node [nodestyle, inner sep=3pt] (a) {$S$}
child {node [nodestyle,inner sep=0pt] {$\{X_1\}$}
child {node [nodestyle, inner sep=1pt] {$X_1$}}
}
child {node [nodestyle,inner sep=1pt] (e) {$X_2$}}
}
};
\draw[decorate sep={0.4mm}{2mm},fill] ($(dummy2.north)-(0,1mm)$) -- (dummy2.south);
\path (0,0.7) node[above] {$S=\{\{X_1\},X_2\}$};
\end{scope}
\end{tikzpicture}
\end{document}


• Your code is good, but there are 2 problems. First is there way to change dot to round (currently is square)? Second can number of dots be reduced to 4 or 5? – Math Wizard Feb 2 '18 at 18:17
• @MathWizard Sorry, I don't understand your first comment, but perhaps you are using a viewer that lets the dots appear as squares? (Just zoom in to check.) And for point 2: Very simple: either decrease in minimum size=1cm to 1cm to some smaller value and/or play with the line style, e.g. loosely dotted instead of dotted. – user121799 Feb 2 '18 at 18:27
• First question means that dots are square (I change line style to very thick and you can see when zoom), while dots in \cdots are circle. – Math Wizard Feb 2 '18 at 18:37
• @MathWizard Apologies! You're right, please see my update. – user121799 Feb 2 '18 at 18:50
• @ marmot, thanks for the answer. Last question, is it possible for dot not to start at the end of branch of node? The reason is that I have other tree with more children that is connected by cdots, which I will not change to dummy variable. – Math Wizard Feb 2 '18 at 20:00