I am trying to plot a function but something is incorrectly written... Could anyone please help me?
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath, tikz}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=0.45]
\draw[->] (-1,0) -- (10,0) node[below] {$x$};
\draw[->] (0,-1) -- (0,10) node[above] {$y$};
\draw[dotted] (1.4,3.33) -- (1.4,0);
\draw[dotted] (0,3.33) -- (1.4,3.33) node[left = 0.65cm] {$\frac{10}{3}$};
\draw [domain=0.1:10] plot (\x,{2/(\x-0.8)}) node[right] {$f(x)=\frac{10}{5x-4}$};
\end{tikzpicture}
\end{document}
\x=0.8
plot
command. With 'pgfplots` however there are ways to get this done as @percusse demonstrated in his answer. If you are going to use more plots in the future, I recommend reading the manual ofpgfplots
, it is really powerful, but it takes some time to get used to it.