Hägg Diagrams

A few days ago the question came up how to draw Hägg diagrams with \LaTeX.

Well for these kinds of diagrams there is an obvious choice: pgfplots.

\documentclass{scrartcl}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
 \def\Ka{10^(-4.75)
}% the equilibrium constant
 \def\co{1}% the starting concentration
 \begin{axis}[ymode=log,domain=0:14]
  \addplot[red] { \co*10^(-x)/(\Ka+10^(-x)) };
  \addplot[blue] { \co*\Ka/(10^(-x)+\Ka) };
 \end{axis}
\end{tikzpicture
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>