[Tex/LaTex] Plot Continuous Line With 2 Points

tikz-pgf

Is there any way to plot a continuous line with pgfplot/tikz using only 2 points (i.e. it will extend past those points on its own) within the domain I specify?

Best Answer

You can use shorten with a negative length to extend the edge.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (a) {A};
\node [right of=a,node distance=3em] (b) {B};
\draw [shorten >=-3em,shorten <=-3em] (a) edge (b);
\end{tikzpicture}
\end{document}

output

Related Question