I would like to draw a graph and some emoticons with it using tikz in latex as shown in the picture below.
N.B. I am doing a presentation in beamer and the meaning of the picture is that the triangle agent is happy when he/she chooses the corresponding circle product.
I found this question that can help me a little but not completely. How to draw a collection of small bipartite graphs in latex?
Here is my code and what I tired. I used these two codes 1 and 2:
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\usepackage{marvosym}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
\newcommand{\smiley}{\tikz[baseline=-0.75ex,black]{
\draw circle (2mm);
\node[fill,circle,inner sep=0.5pt] (left eye) at (135:0.8mm) {};
\node[fill,circle,inner sep=0.5pt] (right eye) at (45:0.8mm) {};
\draw (-145:0.9mm) arc (-120:-60:1.5mm);
}
}
\newcommand{\frownie}{\tikz[baseline=-0.75ex,black]{
\draw circle (2mm);
\node[fill,circle,inner sep=0.5pt] (left eye) at (135:0.8mm) {};
\node[fill,circle,inner sep=0.5pt] (right eye) at (45:0.8mm) {};
\draw (-145:0.9mm) arc (120:60:1.5mm);
}
}
\newcommand{\neutranie}{\tikz[baseline=-0.75ex,black]{
\draw circle (2mm);
\node[fill,circle,inner sep=0.5pt] (left eye) at (135:0.8mm) {};
\node[fill,circle,inner sep=0.5pt] (right eye) at (45:0.8mm) {};
\draw (-135:0.9mm) -- (-45:0.9mm);
}
}
\usetikzlibrary{arrows,chains,matrix,positioning,scopes}
%
\makeatletter
\tikzset{join/.code=\tikzset{after node path={%
\ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%
edge[every join]#1(\tikzchaincurrent)\fi}}}
\makeatother
%
\tikzset{>=stealth',every on chain/.append style={join},
every join/.style={->}}
\tikzstyle{labeled}=[execute at begin node=$\scriptstyle,
execute at end node=$]
%
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes,row sep=3em, column sep=3em]
{ \smiley\; A1 & A2 \\
\smiley\; B1 & B2 \\
\neutranie\; C1 & C2 \\
};
{ [start chain] \chainin (m-1-1);
\chainin (m-1-2);
}
{ [start chain] \chainin (m-2-1);
\chainin (m-2-2);
}
\end{tikzpicture}
\end{document}
And I get this picture: