# why my pic was changed by un-used tikzstyle

In a joint file, my picture was changed by some un-used global tikzstyle, which is added by other. Here is a minimal example. The output dots become bigger if I un-comment the commented line.

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{matrix,arrows,calc}
%\tikzset{cd/.style=matrix of math nodes,row sep=2em,column sep=2em, text height=1.5ex, text depth=0.5ex}

\begin{document}

\begin{tikzpicture}[mydot/.style={draw,circle,inner sep=1.5pt},every label/.style={scale=0.6},scale=0.75]

\node[mydot]      at (0,0)    (p1) {};
\node[mydot]      at (2,0)    (p2) {};

\end{tikzpicture}

\end{document}

-

The style description is not correct and missing braces. Hence only the first option until the comma is included in cd style. The rest applies globally.

\tikzset{cd/.style={ %<--- These are needed
matrix of math nodes,
row sep=1em,column sep=2em, text height=1.5ex, text depth=0.5ex
}%<---
}

-
Oh, thanks so much. – Ma Ming Oct 4 '12 at 11:00

Just to explain what happened.

As percusse explained your style declaration was not correct and the dots' size was influenced by text height and text depth.

-