[Tex/LaTex] What graphics packages are there for creating graphics in LaTeX documents


What packages do you use and recommend for creating graphics in your LaTeX documents?

As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document). We'll eventually sort these answers under headings.

Best Answer

I've compiled this list. I don't have experience with most of these, but, if you do, please add more descriptive text to your package. If it does not appear, again, please add it. If you don't have the rep to edit, post it in a comment and @ messgage myself or the last editor. Also, if you feel that a certain element should not be in the list, remove it and leave a note in your edit explaining why it was removed.

The big ones:

#1 PGF/TikZ. The standard. As Dima said, it's "powerful, flexible, easy to use, and stunning". TikZ provides a high-level user interface. PGF provides lower-level macros.
#2 PStricks. Probably the second most used package.
#3 The default packages. More used than the others, but not by reason of being more powerful. These are mostly useful for including external images (e.g. graphicx) or combined with other packages (e.g. xcolor is used by PGF/TikZ).

Other graphics packages and programmes typically included in TeX distributions include:

  • pgfplots a package for creating 2D and 3D plots of mathematical functions and numerical data, using the PGF graphics framework. Supports but does not need external tools and addresses a wide range of data visualizations with high quality.
  • Xy-pic - Best suited to graphs and diagrams, but capabilities for other formats.
  • ePiX - Best for mathematical figures, creates PSTricks, tikz, or eepic macros.
  • MetaPost - Similar to MetaFont, outputs PostScript files. Used by Knuth. Allows direct inclusion in a LaTeX file via the emp, gmp and mpgraphics package. MetaPost is now integrated in LuaTeX via the mplib library. Using LuaTeX, you can include your metapost figures directly in the TeX/LaTeX file with the luamplib package, without using any external software.
  • MetaFun - An extension to MetaPost.
  • Mfpic - A set of (La)TeX macros providing an interface to MetaPost (or METAFONT).

Independent GUI wrappers and tools which create images suitable for inclusion in LaTeX documents include:

  • LaTeXPiX - Windows GUI, exports PGF LaTeX code
  • TPX - Another Windows GUI, more flexible outputs than LaTeXPiX
  • Xfig - X-Window drawing tool, saves in its own .fig file, but outputs many formats (Including PS).
  • Asymptote - A vector graphics language. Can embed LaTeX within the image. Outputs graphics for your document, not code, although code may be compiled as part of document compilation, with shell escape enabled. It can generate both 2D and 3D figures. 3D figures can be included in a PDF file in the PRC format which allows them to be manipulated when viewed in Adobe Reader.
  • Inkscape - A very powerful and well-supported SVG editor. Can be used to export TikZ code.
  • Ipe - A powerful vector graphics editor, with several snapping modes that make it especially suitable for variety of technical illustrations. Saves in its own .ipe file format, but outputs pdf and eps for inclusion in TeX documents. Uses LaTeX to typeset text, both labels and larger paragraphs. Supports layers and views, which make it possible to "build" illustrations incrementally in a presentation.
  • Knitr/Sweave - Tools that allow you to include R code directly into your LaTeX file. Sweave is the older utility and is part of base utils package in R. Knitr is a package that reimplements and extend the basic ideas in Sweave. They do much more than just generate graphics; they make inclusion of R generated graphics into a LaTeX document very easy.
  • KtikZ,QtikZ - A PGF/Tikz real-time compiler for GNU/Linux, based on Qt and designed to integrate into KDE it has a new version for Windows, but I haven't tested it yet). It can speed up the drawing time while at the same time allowing to code directly in TikZ code. It has a template option which allows to define user commands in an easy way as well as a menu with many common (and not so common) TikZ constructs.
  • GeoGebra - Award-winning free interactive geometry tool. As such it is also a vector graphics editor and a graph plotting software. Supports exporting to PSTricks, TikZ and Asymptote in addition to more traditional image formats. Available for major desktop and mobile platforms.