# Quiver Diagrams in Tex

How can I draw Quiver diagrams (for a specific gauge theory) in Tex like the followings? Diagrams have been taken from the following thesis:

A Pedagogical Introduction to the AGT Conjecture

Any comment or guidance will greatly be appreciated!

• Why don't you show an example of this "quiver" diagram? – m0nhawk Aug 18 '14 at 9:09
• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Aug 18 '14 at 9:09
• Do you know the package tikzcd? This makes such diagrams really easy and gives you the possibility to do fancy coloured stuff (if really necessary). – LaRiFaRi Aug 18 '14 at 9:16
• Can you at least post an image with the intended result? from a google search there are many possible visual representations. In any case they seem to be graphs with some special interpretation for nodes and edges so you may try to start from the TikZ manual, \node and edge operations. – Bordaigorl Aug 18 '14 at 10:42
• Funny, for me a quiver is a direct graph, typically without loops. In the first instance you should at least try and produce some diagrams yourself rather than asking people to do everything for you. You will find similar diagrams in the tikz manual. For example, see chapters 27 and 29. – Andrew Aug 19 '14 at 8:25

Here's a simple solution. It relies on defining the coordinate axes in directions of 30°, 150° and 90°, so that you can easily find coordinates on the honeycomb grid. You then have several parameters influencing the bubble and box shapes. To help with the finding of appropriate coordinates, you can use the \MarkCoordinates macro, which also shows the downside (?) of defining the coordinates this way: the coordinates for a point are not unique. Furthermore, you can define a name for a coordinate that is put in the end of the current line, which will then have the form C-name for easier access when drawing other lines starting here. If no name is specified, the coodinates name will be C-, which will be overwritten by any later object with no name given.

## Code

\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{calc}

\begin{document}

\newcommand{\QBubble}[]%
% : content (optional)
%  2 : start coordinate
%  3 : direction -> relative to start
%  4 : line options
%  5 : node options
%  6 : end point coordinate name
{ \draw[#4] (#2) -- node[semithick, circle, draw=black, solid, fill=white, inner sep=1pt, minimum size=5mm, #5] {#1} ++ (#3) coordinate (C-#6);
}

\newcommand{\QBox}[]%
% : content (optional)
%  2 : start coordinate
%  3 : direction -> relative to start
%  4 : line options
%  5 : node options
%  6 : end point coordinate name
{ \draw[#4] (#2) -- node[sloped, pos=1, semithick, rectangle, draw=black, solid, fill=white, inner sep=1pt, minimum size=5mm, #5] {#1} ++ ($1/2*(#3)$)  coordinate (C-#6);
}

\newcommand{\MarkCoordinates}%
% 1 : x-range
% 2 : y-range
% 3 : z range
{ \foreach \x in {#1}
{   \foreach \y in {#2}
{   \foreach \z in {#3}
{   \node[gray,font=\tiny,shift={(0,0,\z*0.2)}] at (\x,\y,\z) {(\x,\y,\z)};
}
}
}
}

\begin{tikzpicture}
[   x = {(30:1cm)},
y = {(150:1cm)},
z = {(90:1cm)},
scale=1.25,
]
\MarkCoordinates{0,...,2}{0,...,2}{0,...,2}
\QBubble{0,0,0}{1,0,0}{blue, thick}{draw=red}{a}
\QBubble{C-a}{0,0,1}{densely dotted}{}{x2R}
\QBubble[$\gamma$]{C-x2R}{0,1,0}{ultra thick}{}{Bla}
\QBox{C-a}{0,-1,0}{}{}{}
\QBox[Q]{C-x2R}{1,0,0}{red}{draw=green}{}
\QBox[$\sum$]{0,0,0}{0,1,0}{gray}{draw=gray}{}

\draw[-latex] (0,2.5,3.5) -- ++ (1,0,0) node[pos=1.2] {$+x$};
\draw[-latex] (0,2.5,3.5) -- ++ (-1,0,0) node[pos=1.2] {$-x$};
\draw[-latex] (0,2.5,3.5) -- ++ (0,1,0) node[pos=1.2] {$+y$};
\draw[-latex] (0,2.5,3.5) -- ++ (0,-1,0) node[pos=1.2] {$-y$};
\draw[-latex] (0,2.5,3.5) -- ++ (0,0,1) node[pos=1.2] {$+z$};
\draw[-latex] (0,2.5,3.5) -- ++ (0,0,-1) node[pos=1.2] {$-z$};
\end{tikzpicture}

\end{document}


## Output 