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 🙂
Best Answer
By adding these lines:
I got this: