0

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}
\addplot coordinates {
( 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?

0

Use TikZ externalize library. And in the preamble after including pgfplots:

\usetikzlibrary{external}
\tikzexternalize

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.