Soy consciente de preguntas similares, pero como no usan exactamente la misma sintaxis que estoy tratando de hacer, no puedo ver qué hay de diferente entre mi forma de escribir funciones y las demás. Esto es lo que estoy tratando de hacer:
\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=3.5]
\datavisualization
[school book axes,
legend={below,rows=1},
visualize as smooth line/.list={f1,f2},
f1={style=blue, style=very thick,label in legend={text=$\frac{1}{x-1}$}},
f2={style=green, style=very thick,label in legend={text=$\frac{1}{x^2 - 7x - 30}$}}
]
data [set=f1, format=function] {
var x : interval[0.5:4];
func y = 1/(\value{x}-1);
}data [set=f2, format=function] {
var x : interval[0.5:4];
func y = \frac{1}{x^2 - 7x - 30};
};
\end{tikzpicture}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
¿Qué tengo que cambiar? Gracias
func y = 1/(\value x - 1)
Esto resulta en: