5

I'm wondering why my standalone tikz picture gets cropped mid way through the picture? Code is shown below without the input data files.

enter image description here

\documentclass[tikz,border=0pt]{standalone}
\usepackage{tikz}

\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}

    \begin{document}
    \begin{tikzpicture}
                \begin{axis}[
                    title={$F_x$ vs. Time},
                    xlabel={Time ($s$)},
                    ylabel={Force ($N$)},
                    width=100mm, height=80mm,
                    xmin=0,
                    xmax=37.7,
                    xtick={0,5,10,15,20,25, 30, 35, 40},
                    xmajorgrids, xminorgrids, ymajorgrids,
                    legend style={
                        at={(0.05,0.97)}, 
                        anchor=north west, 
                        legend cell align=left
                        }
                ]
            \end{axis}
            \end{tikzpicture}
    \end{document}
Torbjørn T.
  • 206,688

1 Answers1

5

It seems that geometry doesn't work very well with standalone, removing that package makes the PDF come out as expected. In this case there surely isn't any need for geometry anyway, so that's not a loss.

Torbjørn T.
  • 206,688