![]() Example of graphics created with TikZ. Note the slightly translucent top layer. | |
Original author(s) | Till Tantau |
---|---|
Developer(s) | Till Tantau, Christian Feuersänger |
Stable release | 3.1.10 [1] / 15 January 2023 |
Repository | |
Written in | TeX, Lua |
Operating system | Multiplatform (TeX) |
Type | Vector graphics languages |
License | Dual License: GNU General Public License or LaTeX Project Public License |
Website | github |
PGF/TikZ is a pair of languages for producing vector graphics (e.g., technical illustrations and drawings) from a geometric/algebraic description, with standard features including the drawing of points, lines, arrows, paths, circles, ellipses and polygons. PGF is a lower-level language, while TikZ is a set of higher-level macros that use PGF. The top-level PGF and TikZ commands are invoked as TeX macros, but in contrast with PSTricks, the PGF/TikZ graphics themselves are described in a language that resembles MetaPost. Till Tantau is the designer of the PGF and TikZ languages. He is also the main developer of the only known interpreter for PGF and TikZ, which is written in TeX. PGF is an acronym for "Portable Graphics Format". TikZ was introduced in version 0.95 of PGF, and it is a recursive acronym for "TikZ ist kein Zeichenprogramm" (German for "TikZ is not a drawing program").
The PGF/TikZ interpreter can be used from the popular LaTeX and ConTeXt macro packages, and also directly from the original TeX. [2] : 116 Since TeX itself is not concerned with graphics, the interpreter supports multiple TeX output backends: dvips, dvipdfm/dvipdfmx/xdvipdfmx, TeX4ht, and pdftex's internal PDF output driver. [2] : 117–120 Unlike PSTricks, PGF can thus directly produce either PostScript or PDF output, but it cannot use some of the more advanced PostScript programming features that PSTricks can use due to the "least common denominator" effect. [3] PGF/TikZ comes with an extensive documentation; the version 3.1.4a of the manual has over 1300 pages. [2]
The standard LaTeX picture
environment can also be used as a front end for PGF — by merely using the pgfpict2e
package. [2] : 27
The project has been under constant development since 2005. [4] Most of the development until 2018 was done by Till Tantau and since then Henri Menke has been the main contributor. [5] Version 3.0.0 was released on 20 December 2013. [6] One of the major new features of this version was graph drawing using the graphdrawing
package, which however requires LuaTeX. [7] This version also added a new data visualization method and support for direct SVG output via the new dvisvgm driver. [6]
Several graphical editors can produce output for PGF/TikZ, such as the KDE program Cirkuit [8] and the math drawing program GeoGebra. [9] Export to TikZ is also available as extensions for Inkscape, [10] Blender, [11] MATLAB, [12] matplotlib, [13] Gnuplot, [14] , Julia, [15] and R. [16] The circuit-macros package [17] of m4 macros exports circuit diagrams to TikZ using the dpic -g
command line option. [18] The dot2tex program can convert files in the DOT graph description language to PGF/TikZ. [19]
TikZ features libraries for easy drawing of many kinds of diagrams, such as the following (alphabetized by library name): [2]
3d
automata
calc
calendar
chain
circuits.logic
and circuits.ee
er
folding
graphdrawing
lindenmayersystems
math
matrix
mindmap
perspective
petri
quantikz
rdf
shapes.geometric
and shapes.symbols
spy
svg.path
trees
turtle
views
The following images were created with TikZ and show some examples of the range of graphic types that can be produced. The link in each caption points to the source code for the image.
calc
)arrows
, calc
, decorations.markings
, intersections
, positioning
)arrows
, backgrounds
, calc
, fit
, matrix
, patterns
, plotmarks
, shadows
)arrows
)arrows.meta
)calc
)arrows
, calc
, positioning
, shapes.multipart
)LaTeX is a software system for typesetting documents. LaTeX markup describes the content and layout of the document, as opposed to the formatted text found in WYSIWYG word processors like Microsoft Word, LibreOffice Writer and Apple Pages. The writer uses markup tagging conventions to define the general structure of a document, to stylise text throughout a document, and to add citations and cross-references. A TeX distribution such as TeX Live or MiKTeX is used to produce an output file suitable for printing or digital distribution.
gnuplot is a command-line and GUI program that can generate two- and three-dimensional plots of functions, data, and data fits. The program runs on all major computers and operating systems . Originally released in 1986, its listed authors are Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell, Gershon Elber, Alexander Woo "and many others." Despite its name, this software is not part of the GNU Project.
The device independent file format (DVI) is the output file format of the TeX typesetting program, designed by David R. Fuchs and implemented by Donald E. Knuth in 1982. Unlike the TeX markup files used to generate them, DVI files are not intended to be human-readable; they consist of binary data describing the visual layout of a document in a manner not reliant on any specific image format, display hardware or printer. DVI files are typically used as input to a second program which translates DVI files to graphical data. For example, most TeX software packages include a program for previewing DVI files on a user's computer display; this program is a driver. Drivers are also used to convert from DVI to popular page description languages and for printing.
MetaPost refers to both a programming language and the interpreter of the MetaPost programming language. Both are derived from Donald Knuth's Metafont language and interpreter. MetaPost produces vector graphic diagrams from a geometric/algebraic description. The language shares Metafont's declarative syntax for manipulating lines, curves, points and geometric transformations. However,
Xfig is a free and open-source vector graphics editor which runs under the X Window System on most UNIX-compatible platforms.
Graphviz is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts having the file name extension "gv". It also provides libraries for software applications to use the tools. Graphviz is free software licensed under the Eclipse Public License.
DOT is a graph description language, developed as a part of the Graphviz project. DOT graphs are typically stored as files with the .gv
or .dot
filename extension — .gv
is preferred, to avoid confusion with the .dot
extension used by versions of Microsoft Word before 2007. dot
is also the name of the main program to process DOT files in the Graphviz package.
ΧyMTeΧ is a macro package for TeX which renders high-quality chemical structure diagrams. Using the typesetting system, the name is styled as XϒMTeX. It was originally written by Shinsaku Fujita. Molecules are defined by TeX markup.
ConTeXt is a general-purpose document processor. Like LaTeX, it is derived from TeX. It is especially suited for structured documents, automated document production, very fine typography, and multilingual typesetting. It is based in part on the TeX typesetting system, and uses a document markup language for manuscript preparation. The typographical and automated capabilities of ConTeXt are extensive, including interfaces for handling microtypography, multiple footnotes and footnote classes, and manipulating OpenType fonts and features. Moreover, it offers extensive support for colors, backgrounds, hyperlinks, presentations, figure-text integration, and conditional compilation. It gives the user extensive control over formatting while making it easy to create new layouts and styles without learning the low-level TeX macro language.
Cairo is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different back ends. Cairo uses hardware acceleration when available.
PSTricks is a set of macros that allow the inclusion of PostScript drawings directly inside TeX or LaTeX source code. It was originally written by Timothy Van Zandt and has been maintained in recent years by Denis Girou, Sebastian Rahtz and Herbert Voss.
A number of vector graphics editors exist for various platforms. Potential users of these editors will make a comparison of vector graphics editors based on factors such as the availability for the user's platform, the software license, the feature set, the merits of the user interface (UI) and the focus of the program. Some programs are more suitable for artistic work while others are better for technical drawings. Another important factor is the application's support of various vector and bitmap image formats for import and export.
Beamer is a LaTeX document class for creating presentation slides, with a wide range of templates and a set of features for making slideshow effects.
Asymptote is a descriptive vector graphics language – developed by Andy Hammerlindl, John C. Bowman, and Tom Prince – which provides a natural coordinate-based framework for technical drawing. Asymptote runs on all major platforms. It is free software, available under the terms of the GNU Lesser General Public License (LGPL).
WinFIG is a proprietary shareware vector graphics editor application. The file format and rendering are as close to Xfig as possible, but the program takes advantage of Windows features like clipboard, printer preview, multiple documents etc.
CircuiTikZ is a TikZ add-on for typesetting circuit diagrams in a TeX environment such as LaTeX. It was started by Massimo Redaelli in 2007 when he had to create exams at the Polytechnic University of Milan as a research assistant. After he left University in 2010 the project began to stumble. From 2015 on the further development mainly takes place at the Institute for Electronics Engineering of the Friedrich-Alexander-Universität Erlangen-Nürnberg.
PlantUML is an open-source tool allowing users to create diagrams from a plain text language. Besides various UML diagrams, PlantUML has support for various other software development related formats, as well as visualisation of JSON and YAML files.
PyX is a Python package for the creation of PostScript, PDF, and static SVG files. It combines an abstraction of the PostScript drawing model with a TeX/LaTeX interface. Complex tasks like 2d and 3d plots in publication-ready quality are built out of these primitives. Its goals are similar to those of other metalanguages for PDF drawing, such as TikZ or Asymptote.