# exporting plotted diagram in LaTex

i plotted a diagram in latex, then i need to export it as .jpg or .eps file, here is my .tex code?

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
( 338.1, 266.45 )
( 169.1, 143.43 )
( 84.5, 64.80 )
( 42.3, 34.19 )
( 21.1, 9.47 )
};
\end{axis}
\end{tikzpicture}
\end{document}


how can i do this?

Use TikZ externalize library. And in the preamble after including pgfplots:
\usetikzlibrary{external}

Now you'll get an image in a .pdf and can convert to whatever you want format it will be.