I must admit that when I first read the question, my reaction was "Don't do that!".
The "that" which I was thinking of was putting stuff inside a node. But then I saw that you were actually using a matrix node which is explicitly designed for putting stuff inside! However, once I'd seen that you were using a matrix node, I was puzzled as to why you were giving explicit coordinates to the entries as the matrix is meant to deal with all the alignment.
So although you've answered your immediate question, I'd like to offer a couple of reformulations of your code which make use of the matrix alignment. The first is your code (with your correction). The second simply uses the same basic code but uses the matrix to put the sub-objects in their place. The third replaces the sub-objects by nodes. The difference here is subtle: it allows you to put your style options in a different place (and thus organise them slightly differently, and make it easier to modify them all in one go), and the base of the arrow is now the border of the circle, not its centre. To restore it to its centre, make the reference firstNode-1-2.center
. Once again, this gives greater flexibility.
Here's the code. The TikZ libraries are only needed for the last version.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes.geometric}
\begin{document}
\begin{tikzpicture}
%first node
\node [fill=blue!20, matrix] (firstNode)
{
%some dots
\fill[red] (0.4,0.2) coordinate (thepoint) circle (3pt);
\fill[black] (0.0,0.2) circle (3pt);
\fill[black] (0.0,-0.2) circle (3pt);\\
};
%another node
\node[fill=green!20](anotherNode) at (3,0) {2nd node};
%the line
\draw[-latex] (thepoint) to [out=30,in=180] (anotherNode.west);
\end{tikzpicture}
\begin{tikzpicture}
%first node
\matrix [fill=blue!20,row sep={0.4cm,between origins},column sep={0.4cm,between origins}] (firstNode)
{
\fill[black] circle (3pt); &
\fill[red] circle (3pt) coordinate (thepoint); \\
\fill[black] circle (3pt);\\
};
%another node
\node[fill=green!20](anotherNode) at (3,0) {2nd node};
%the line
\draw[-latex] (thepoint) to [out=30,in=180] (anotherNode.west);
\end{tikzpicture}
\begin{tikzpicture}
%first node
\matrix [
matrix of nodes,
every cell/.style={
ellipse,
minimum size=6pt,
inner sep=0pt,
},
fill=blue!20,
row sep={%
0.4cm,%
between origins,%
},
column sep={%
0.4cm,%
between origins,%
}
] (firstNode)
{
|[fill=black]| {} &
|[fill=red]| {} \\
|[fill=black]| {} \\
};
%another node
\node[fill=green!20](anotherNode) at (3,0) {2nd node};
%the line
\draw[-latex] (firstNode-1-2) to [out=30,in=180] (anotherNode.west);
\end{tikzpicture}
\end{document}
