# Ends of plot get cut off

About 1/10 of one of my plots gets cut off on both sides, no matter how xmin and xmax are set. How can this be prevented?

\documentclass{standalone}
\usepackage{tikz,pgfplots}

\begin{document}

\begin{tikzpicture} \pgfplotsset{scale only axis}
\begin{axis}[ymin=0,xmin=0,xmax=1,
axis y line*=left,
width=13cm,height=7cm,tick align=center]
coordinates{
(0.0001,2)
(0.999999,2)
};
\end{axis}

\begin{axis}[axis y line*=right,
axis x line=none,width=13cm,height=7cm]


• You have to give, xmin, xmax, ymin and ymax to the second axis environment too. But I am not sure what you really want to do. – koleygr Mar 6 at 16:22
• If you replace \pgfplotsset{scale only axis} by \pgfplotsset{scale only axis,xmin=0,xmax=1} then these values will apply to all plots in this tikzpicture. – marmot Mar 6 at 16:26