我正在尝试为所谓的 Goldbeter-Koshland 循环创建一个小方案。我快完成了,但我必须在从 P 到 P* 的箭头上方包含文本 $E_1$,以及从文本底部到箭头中间的小箭头。我该怎么做?到目前为止,我有以下代码:
\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}
我希望这个图看起来像这样:
E_1
|
--->
P1 P2
<---
|
E_2
提前致谢!
答案1
添加具有名称的节点然后绘制箭头:
\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}
答案2
您只需添加一个节点即可。
笔记:
- 您可以通过选项调整沿线的位置
pos=
。我将其放置在0.5
与相同的位置midway
。请参阅沿路径移动标签更多细节。 - 添加
above
和below
选项是为了使标签不在线本身上。
代码:
\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}