Im trying to do a hyperbola with the a tangent in the middle, more or less like this, centered in x=4 and y=3
the MWE is
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions}
\begin{document}
\begin{tikzpicture}
\datavisualization[
school book axes,
visualize as smooth line/.list={left,right},
x axis={length=6cm, ticks and grid={major also at=4}},
y axis={length=6cm, ticks={some}},
data/format=function
]
data[set=left] {
var x : interval [0:3.9] samples 84;
func y = 1 / (\value x - 4);
}
data[set=right] {
var x : interval[4.1:8] samples 84;
func y = 1 / (\value x - 4);
};
\addplot [mark=none,draw=violet,ultra thick,smooth,domain=0:360] {-1*tan(\x)};
\end{tikzpicture}
\end{document}
I usually give the trigonometric functions arguments in degress, but lately it seems to work without a domain, and went well too. But this time seems not to work the tangent- The main problem is that I cant work the hyperbola to get up to y=3. Perhaps it is needs to declare the axis section, but I wonder if this will conflict with the custom definitions of the hyperbola thingys.