\documentclass[a4paper]{article}

\usepackage{pgfplots}
\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}


\begin{document}
\pgfplotsset{small,samples=5}

\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge x limits=false]
	\addplot {x};
		
	\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge x limits={abs=1cm}]
	\addplot {x};
	\draw[red] (axis cs:5,5) -- ++ (1cm,0cm);
	\draw[red] (axis cs:-5,-5) -- ++ (-1cm,0cm);
	\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge x limits={abs=1cm,upper}]
	\addplot {x};
	\draw[red] (axis cs:5,5) -- ++ (1cm,0cm);
	\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge x limits={abs=1cm,lower}]
	\addplot {x};
	\draw[red] (axis cs:-5,-5) -- ++ (-1cm,0cm);
	\end{axis}
\end{tikzpicture}




\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge y limits={abs=1cm}]
	\addplot {x};
	\draw[red] (axis cs:5,5) -- ++ (0cm,1cm);
	\draw[red] (axis cs:-5,-5) -- ++ (0cm,-1cm);
	\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge y limits={abs=1cm,upper}]
	\addplot {x};
	\draw[red] (axis cs:5,5) -- ++ (0cm,1cm);
	\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
	\begin{axis}[clip=false,enlarge y limits={abs=1cm,lower}]
	\addplot {x};
	\draw[red] (axis cs:-5,-5) -- ++ (0cm,-1cm);
	\end{axis}
\end{tikzpicture}



\begin{tikzpicture}
	\begin{axis}[clip=false,
		enlarge x limits={abs=2cm},
		enlarge y limits={abs=1cm,lower},
	]
	\addplot {x};
	\draw[green] (axis cs:5,5) -- ++ (2cm,0cm);
	\draw[green] (axis cs:-5,-5) -- ++ (-2cm,0cm);
	\draw[red] (axis cs:-5,-5) -- ++ (0cm,-1cm);
	\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
	\begin{axis}[clip=false,
		width=4cm,
		height=4cm,
		enlarge x limits={abs=2cm},
	]
	\addplot {x};
	\draw[green] (axis cs:5,5) -- ++ (2cm,0cm);
	\draw[green] (axis cs:-5,-5) -- ++ (-2cm,0cm);
	\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
	\begin{axis}[clip=false,
		enlarge x limits={abs=2cm},
		disabledatascaling,
	]
	\addplot3[surf] {x*y};
	\draw[green] (axis cs:5,-5,0) -- ++ (2cm,0cm);
	\draw[green] (axis cs:-5,-5,0) -- ++ (-2cm,0cm);
	\end{axis}
\end{tikzpicture}

\end{document}

