# Tikz functions and coordinate system: Adding points and labels

I managed to adjust some of the existing code a little bit to fit my needs. I can plot simple functions.

(1) I want to add labels to the coordinate system, for example e (~ 2.71) to the x-axes and 1/e.

(2) Furthermore I like to label special points on the function graphs. For example at the coordinate x=e and y=1.

\documentclass[13pt,a4paper,headlines=6,headinclude=true]{scrartcl}

\usepackage{amsmath,amssymb,stmaryrd}
\usepackage{tikz,pgfplots}
\usetikzlibrary{datavisualization.formats.functions}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{tikzpicture}[yscale=.5, xscale=.5, scale=2]
\datavisualization
[school book axes,
legend={below,rows=1},
visualize as smooth line/.list={f1,f2,f3},
f1={style=blue, style=very thick,label in legend={text=$e^x$}},
f2={style=green, style=very thick,label in legend={text=$ln(x)$}},
f3={style=red, style=very thick,label in legend={text=$x$}}
]
data [set=f1, format=function] {
var x : interval[-5:2];
func y = e^(\value x);
}data [set=f2, format=function] {
var x : interval[0.1:5];
func y = ln(\value x);
}data [set=f3, format=function] {
var x : interval[-3:3];
func y = (\value x);
};
\end{tikzpicture}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Thank you :)

• From a typographical point of view, It would be better to replace $ln(x)$ by $\ln(x)$. – Franck Pastor Apr 23 '15 at 9:51
• Of course this is right. Thank you for your remark. – Mac Apr 23 '15 at 12:57

 \draw[shift={(e,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {$e$};