This graph has 3 functions on it
t=x-r, r<0, x<0 x=r, r>1, x>1 (x-r)/(1-r), 0
My problem is I am wishing to stop the (x-r)/(1-r) lines at the point (1,1) as seen in my drawing below. Could anyone help me with this please?
Currently have this, also struggling with drawing the vertical lines.
\documentclass[border=2mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=-1, xmax=1.5,
ymin=0, ymax=1.5,
axis lines=center,
axis on top=true,
domain=-2:3,
]
\addplot [mark=none,draw=red,ultra thick] {x+1};
\addplot [mark=none,draw=red,ultra thick] {x+2};
\addplot [mark=none,draw=red,ultra thick] {x+1.5};
\addplot [mark=none,draw=red,ultra thick] {x};
\addplot [mark=none,draw=red,ultra thick] {x+0.5};
\addplot [mark=none,draw=green,ultra thick] {(x-.5)/(1-.5)};
\end{axis}
\end{tikzpicture}
\end{document}
\documentclass{...}
, the required\usepackage
's,\begin{document}
, and\end{document}
. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.