I'm struggling with finding out how to draw intercept lines on a graph to find approximate values on a graph like the red and blue lines below.
I'm trying to add lines from the y-axis at 100 down to approximately 11 on the x-axis.
Code: Select all
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel={Metres [m]},
xtick align=outside,
xmin=0,
xmax=20,
ylabel={Cost [£]},
ytick align=outside,
ymin=0,
ymax=180,
axis lines=left,
ymajorgrids=true,
xmajorgrids=true,
grid style=dashed,
]
\addplot
coordinates {(1,9) (2,18) (4,36) (5,45) (10,90) (20,180)}
;
\end{axis}
\end{tikzpicture}
\end{document}