\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\begin{document}
\fbox{%
\begin{tikzpicture}
\begin{axis}[xmin=0,xmax=1,ymin=0,ymax=1,hide axis]
	\addplot+[domain=0.5:1] {x};
\end{axis}
\end{tikzpicture}}

\fbox{%
\begin{tikzpicture}
\begin{axis}[xmin=0,xmax=1,ymin=0,ymax=1]
	\addplot+[domain=0.5:1] {x};
\end{axis}
\end{tikzpicture}}

\end{document} 
