8

I am trying to create a small scheme for the so called Goldbeter-Koshland loop. I'm almost done, but I have to include the text $E_1$ above the arrow that goes from P to P* and a small arrow that goes from the base of the text to the middle of the arrow. How can I do that? So far I have the following code:

\begin{figure}
\centering
\begin{tikzpicture}
[bend angle =60,inner sep=0pt, minimum size =10mm,very thick,
from/.style={<-},
towards/.style={->},
protein/.style={circle,draw=black,very thick},
reaction/.style={}]
\node[protein] (p) at (-2,0) {$P$};
\node[protein] (ps) at (2,0) {$P^*$}
edge [towards, bend left] (p)
edge [from,bend right] (p) ;
\end{tikzpicture}
\end{figure}

I would like the figure to look something like:

   E_1
    |
   --->
P1      P2
  <--- 
    |
   E_2

Thanks in advance!

2 Answers2

6

You can just add a node.

enter image description here

Notes:

  • You can adjust the position along the line by pos= option. I placed it at 0.5 which is the same as midway. See Moving a label along the path for more details.
  • The above and below options are added so that the label is not on the line itself.

Code:

\documentclass{article}
\usepackage{tikz}

\begin{document} \begin{figure} \centering \begin{tikzpicture} [bend angle =60,inner sep=0pt, minimum size =10mm,very thick, from/.style={<-}, towards/.style={->}, protein/.style={circle,draw=black,very thick}, reaction/.style={}] \node[protein] (p) at (-2,0) {$P$}; \node[protein] (ps) at (2,0) {$P^*$} edge [towards, bend left] node [pos=0.5, below] {$E_2$} (p) edge [from, bend right] node [pos=0.5, above] {$E_1$} (p) ; \end{tikzpicture} \end{figure} \end{document}

Peter Grill
  • 223,288
  • With auto and swap you don't have to manually position the nodes at the arrows. – Qrrbrbirlbel Nov 02 '12 at 18:52
  • @Qrrbrbirlbel: I am not familiar with those options. Using auto I get both nodes below the lines. Using auto, swap I get both labels above the lines. Using auto for the first one and auto, swap does yield the desired result. Is that what you meant? – Peter Grill Nov 02 '12 at 18:56
  • Yes, it is. Normally one would issue auto=[left|right] to the outer scope and use only swap where it's needed. In this instance, I'd set auto and just use \path[bend left, towards] (ps) edge node {$E_2$} (p) (p) edge node {$E_1$} (ps); … no need to set any manual positions. – Qrrbrbirlbel Nov 02 '12 at 19:02
6

Add a nodes with names and then draw the arrows:

\documentclass[12pt]{article}
\usepackage{tikz}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}
[bend angle =60,inner sep=0pt, minimum size =10mm,very thick,
from/.style={<-},
towards/.style={->},
protein/.style={circle,draw=black,very thick},
reaction/.style={}]
\node[protein] (p) at (-2,0) {$P$};
\node[protein] (ps) at (2,0) {$P^*$}
edge [towards, bend left] node[below=20pt,name=e2] {$E_2$} (p)
edge [from,bend right] node[above=20pt,name=e1] {$E_1$} (p) ;
\draw[->] (e1) -- +(0pt,-25pt);
\draw[->] (e2) -- +(0pt,25pt);
\end{tikzpicture}
\end{figure}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128