I would like to know how to draw a quiver diagram like this one. I know there exists TikZ or something like that, but I don't know the commands or packages necessary to draw it.


7 Answers 7


As you want the arrows close to the nodes I think that you need to use a decoration. Here is one way to do it:

enter image description here

and here is the code:



\tikzset{% arrow close to the source: the 0.2 determines where the arrow is drawn
  ->-/.style={decoration={markings, mark=at position 0.2 with {\arrow{stealth}}},

\begin{tikzpicture}[every node/.style={circle,draw},thick]
  \node(NL) at (0,0){$N$};
  \node(NR) at (2,0){$N$};
  \draw[->-](NL.north east)--(NR.north west);
  \draw[->-](NR.south west)--(NL.south east);

  • 3
    you can set outer sep=0 of the nodes for better merging.
    – percusse
    Oct 17, 2014 at 9:12
  • Thanks for your help. I have an extra question... In your code (that works), how can I enlarge the circles... I mean, the whole figure?. Oct 21, 2014 at 4:21
  • 1
    @user133596 Adding scale=3 to the tikzpicture environment (that is, \begin{tikzpicture}[scale=3, every node...]') will make the picture three times larger. Adding minimum size` to the node specifications will make the nodes bigger (so every node/.style={circle,draw,minimum size=16mm} or \node[minimum size=20mm](NR)...).
    – user30471
    Oct 21, 2014 at 11:18

An answer using TikZ version 3:




    every node/.style={circle,draw,outer sep=0},
  \node(NL) at (0,0){$N$};
  \node(NR) at (2,0){$N$};
  \draw[->-](NR.north west)--(NL.north east);
  \draw[->-](NL.south east)--(NR.south west);


The line \pgfarrowsdeclare{:}{:}{}{} is used to create a "no-tip" arrow spec (see this answer). Then the special arrows are generated using arrows={:Stealth[reversed,sep=1.5ex]-} which reads as

put no tip, then a reversed Stealth tip separated by 1.5ex space from the previous and then complete the arrow with a line to destination

This style is then aliased to ->- for better readability and reusability, similarly to @Andrew's answer.


A somewhat similar PSTricks solution:



     offset = -8pt,
     nodesep = -3pt, % adjust manually
     ArrowInside = ->,
     ArrowInsidePos = 0.25,
     arrowsize = 0.2
 \caption{A quiver diagram between #1 and #2.} % I have no idea if it's called that...


% \quiver[<radius>, <separation>]{<left node>}{<right node>}
\quiver[0.5, 3.5]{$N$}{$M$}



All you have to do is choose the radius of the circles and the distance between them, and choose what to write in the circles (as the arguments to the \quiver command).


The "or something like that" in the OP includes Metapost, the Knuth-Hobby drawing language. Here's my attempt at your quiver diagram.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";


-z1 = z2 = 40 right;

path c[]; 
c1 = fullcircle scaled 20 shifted z1; 
c2 = fullcircle scaled 20 shifted z2; 

draw c1; draw c2; 
label(btex $N$ etex, z1); 
label(btex $N$ etex, z2); 

path a[]; 
s = 2/3; % 8 points in a "fullcircle" so 2/3 == 30°
a1 = point 0-s of c1 -- point 4+s of c2;
a2 = point 4-s of c2 -- point 0+s of c1;

r = 1/5;
drawarrow subpath(0,r) of a1; draw subpath (r,1) of a1;
drawarrow subpath(0,r) of a2; draw subpath (r,1) of a2;


Another PSTricks one:




\quiver{$N$}{$n$} \par\bigskip


enter image description here


A short solution with \pstricks-add. The nodesep parameter has been adjusted manually:



\[ \psset{ArrowInside=->, ArrowInsidePos=0.25, arrowinset=0.25 , linewidth=0.6pt, nodesep=-1.5pt, colsep=1.2cm, offset=1ex}
\begin{psmatrix}[mnode = circle]
N & N


enter image description here

  • What does the pdf option do for article in this case exactly? Does it load some package?
    – skpblack
    Oct 17, 2014 at 10:47
  • 1
    @skpblack: it allows for compiling directly with pdflatex, provided you use the -shell-escape (TeX Live, MacTeX) switch, or --enable-write18(MiKTeX). It tells pstricks to load the auto-pst-pdf package, whch does the job.
    – Bernard
    Oct 17, 2014 at 10:53

Just for fun with TikZ.


    \draw (-2,0) circle (12pt) (2,0) circle (12pt);
    \draw[->] (60:12pt)++(-2,0) -- +(1,0);
    \draw (60:12pt) ++(-1,0) ++ (-2pt,0) -- ($(120:12pt)+(2,0)$); 
    \draw[->] (-120:12pt) ++(2,0) -- +(-1,0);
    \draw (-120:12pt) ++(1,0) ++ (2pt,0) -- ($(-60:12pt)+(-2,0)$); 
    \node at (-2,0) {A};
    \node at (2,0) {B}; 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .