# Trouble with pgfplots and ubuntu [duplicate]

Using writelatex (because I was at work where I had to use a windows machine which did not have a working Latex setup) I was able to produce some relatively nice-looking graphics using pgfplots.

My laptop runs Ubuntu 12.04 LTS and has every TexLive package installed and seemingly working well. Looking at the Ubuntu package manager this would seem to include pgfplots via texlive-pictures.

Still when I run this stripped-down version of an example I was trying to create:

\documentclass{amsart}

\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{width=\textwidth,height=\textheight}

\begin{document}

\begin{tikzpicture}
\begin{axis}[hide axis,enlargelimits=false]
{cos(x)};
{-cos(x)};
{0};

\end{axis}
\end{tikzpicture}

\end{document}


I get this abomination:

If you can't tell, the desired picture is supposed to be of smooth intertwining cosine graphs with the intersection points marked and without any axes or legend.

I see from googling around that there are some potential problems installing pgfplots, but supposedly if it's already installed I should be in the clear. So what's the problem?

## marked as duplicate by cmhughes, texenthusiast, Svend Tveskæg, ChrisS, karlkoellerFeb 25 '14 at 5:08

• Are the LaTeX packages coming from the original ubuntu repositories? I think in 12.04 they were pretty old (TL2009). Please check the dates using \listfiles in the very first line of your main document. – Johannes_B Feb 24 '14 at 13:49