HOME

TheInfoList



OR:

PGF/Ti''k''Z is a pair of languages for producing
vector graphics Vector graphics is a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector display a ...
(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 Ti''k''Z is a set of higher-level macros that use PGF. The top-level PGF and Ti''k''Z commands are invoked as
TeX Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
macros, but in contrast with PSTricks, the PGF/Ti''k''Z graphics themselves are described in a language that resembles
MetaPost 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/algebra ...
. Till Tantau is the designer of the PGF and Ti''k''Z languages. He is also the main developer of the only known interpreter for PGF and Ti''k''Z, which is written in TeX. PGF is an acronym for "Portable Graphics Format". Ti''k''Z was introduced in version 0.95 of PGF, and it is a
recursive acronym A recursive acronym is an acronym that refers to itself, and appears most frequently in computer programming. The term was first used in print in 1979 in Douglas Hofstadter's book '' Gödel, Escher, Bach: An Eternal Golden Braid'', in which Hof ...
for "Ti''k''Z ist ''kein'' Zeichenprogramm" (German for "Ti''k''Z is ''not'' a drawing program").


Overview

The PGF/Ti''k''Z interpreter can be used from the popular
LaTeX Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latexes are found in nature, but synthetic latexes are common as well. In nature, latex is found as a milky fluid found in 10% of all flowering plants (angiosperms ...
and
ConTeXt Context may refer to: * Context (language use), the relevant constraints of the communicative situation that influence language use, language variation, and discourse summary Computing * Context (computing), the virtual environment required to su ...
macro packages, and also directly from the original
TeX Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
. Since TeX itself is not concerned with graphics, the interpreter supports multiple TeX output backends:
dvips dvips is a computer program that converts the Device Independent file format (DVI) output of TeX typography into a printable or otherwise presentable form. was written by Tomas Rokicki to produce printable PostScript files from DVI input, and ...
,
dvipdfm 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 inten ...
/
dvipdfmx 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 inte ...
/ xdvipdfmx,
TeX4ht TeX4ht is a configurable converter capable of translating TeX and LaTeX documents to HTML and certain XML formats. Most notably, TeX4ht serves for converting (La)TeX documents to formats used by word processors. It was developed by Eitan M. Gurari ...
, and
pdftex __NOTOC__ The computer program pdfTeX is an extension of Knuth's typesetting program TeX, and was originally written and developed into a publicly usable product by Hàn Thế Thành as a part of the work for his PhD thesis at the Faculty of In ...
's internal
PDF Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
output driver. Unlike PSTricks, PGF can thus directly produce either
PostScript PostScript (PS) is a page description language in the electronic publishing and desktop publishing realm. It is a dynamically typed, concatenative programming language. It was created at Adobe Systems by John Warnock, Charles Geschke, Doug Br ...
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. PGF/Ti''k''Z comes with an extensive documentation; the version 3.1.4a of the manual has over 1300 pages. The standard LaTeX picture environment can also be used as a front end for PGF — by merely using the pgfpict2e package. The project has been under constant development since 2005. Most of the development is done by Till Tantau. Version 3.0.0 was released on 20 December 2013. One of the major new features of this version was
graph drawing Graph drawing is an area of mathematics and computer science combining methods from geometric graph theory and information visualization to derive two-dimensional depictions of graph (discrete mathematics), graphs arising from applications such a ...
using the graphdrawing package, which however requires
LuaTeX LuaTeX is a TeX-based computer typesetting system which started as a version of pdfTeX with a Lua scripting engine embedded. After some experiments it was adopted by the TeX Live distribution as a successor to pdfTeX (itself an extension of ε-TeX, ...
. This version also added a new data visualization method and support for direct SVG output via the new
dvisvgm 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 inte ...
driver.


Export

Several graphical editors can produce output for PGF/Ti''k''Z, such as the
KDE KDE is an international Free software movement, free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-know ...
program Cirkuit and the math drawing program
GeoGebra GeoGebra (a portmanteau of ''geometry'' and ''algebra'') is an interactive geometry, algebra, statistics and calculus application, intended for learning and teaching mathematics and science from primary school to university level. GeoGebra is av ...
. Export to Ti''k''Z is also available as extensions for
Inkscape Inkscape is a free and open-source vector graphics editor used to create vector images, primarily in Scalable Vector Graphics (SVG) format. Other formats can be imported and exported. Inkscape can render primitive vector shapes (e.g. rectang ...
,
Blender A blender (sometimes called a mixer or liquidiser in British English) is a kitchen appliance, kitchen and laboratory appliance used to mix, crush, purée or emulsion, emulsify food and other substances. A stationary blender consists of a blender ...
,
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation ...
,
matplotlib Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPytho ...
,
Gnuplot 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 (Linux, Unix, Microsoft Windows, macOS, FreeDOS, an ...
, and R. The circuit-macros package of
m4 macros m4 is a general-purpose macro processor included in most Unix-like operating systems, and is a component of the POSIX standard. The language was designed by Brian Kernighan and Dennis Ritchie for the original versions of UNIX. It is an extensio ...
exports
circuit diagram A circuit diagram (wiring diagram, electrical diagram, elementary diagram, electronic schematic) is a graphical representation of an electrical circuit. A pictorial circuit diagram uses simple images of components, while a schematic diagram s ...
s to Ti''k''Z using the dpic -g command line option. The dot2tex program can convert files in the DOT graph description language to PGF/Ti''k''Z.


Libraries

Ti''k''Z features
libraries A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
for easy drawing of many kinds of diagrams, such as the following (alphabetized by library name): * 3D drawing3d *
Finite automata A finite-state machine (FSM) or finite-state automaton (FSA, plural: ''automata''), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number o ...
and
Turing machine A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algori ...
sautomata *
Coordinate system In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine the position of the points or other geometric elements on a manifold such as Euclidean space. The order of the coordinates is sig ...
calculationscalc *
Calendar A calendar is a system of organizing days. This is done by giving names to periods of time, typically days, weeks, months and years. A date is the designation of a single and specific day within such a system. A calendar is also a physi ...
scalendar * Chains:
node In general, a node is a localized swelling (a "knot") or a point of intersection (a vertex). Node may refer to: In mathematics *Vertex (graph theory), a vertex in a mathematical graph *Vertex (geometry), a point where two or more curves, lines, ...
s typically connected by edges and arranged in rows and columnschain *
Logic circuit A logic gate is an idealized or physical device implementing a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic gate, ...
and electrical
circuit diagram A circuit diagram (wiring diagram, electrical diagram, elementary diagram, electronic schematic) is a graphical representation of an electrical circuit. A pictorial circuit diagram uses simple images of components, while a schematic diagram s ...
scircuits.logic and circuits.ee * Entity–relationship diagramser *
Polygon folding In geometry, a net of a polyhedron is an arrangement of non-overlapping edge-joined polygons in the plane which can be folded (along edges) to become the faces of the polyhedron. Polyhedral nets are a useful aid to the study of polyhedra and sol ...
diagramsfolding *
Graph drawing Graph drawing is an area of mathematics and computer science combining methods from geometric graph theory and information visualization to derive two-dimensional depictions of graph (discrete mathematics), graphs arising from applications such a ...
with
automatic layout Automatic layout is an option in graph drawing toolkits that allow to lay out the Graph (discrete mathematics), Graph according to specific rules, such as: *reducing the length of the arcs between the Graph vertex (graph theory), vertices *red ...
optionsgraphdrawing *
L-system An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into some ...
drawingslindenmayersystems * Sequences of basic math
operation Operation or Operations may refer to: Arts, entertainment and media * ''Operation'' (game), a battery-operated board game that challenges dexterity * Operation (music), a term used in musical set theory * ''Operations'' (magazine), Multi-Ma ...
smath *
Matrices Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
matrix *
Mind map A mind map is a diagram used to visually organize information into a hierarchy, showing relationships among pieces of the whole. It is often created around a single concept, drawn as an image in the center of a blank page, to which associated r ...
smindmap *
Three-point perspective Linear or point-projection perspective (from la, perspicere 'to see through') is one of two types of graphical projection perspective in the graphic arts; the other is parallel projection. Linear perspective is an approximate representation, ...
drawingsperspective *
Petri net A Petri net, also known as a place/transition (PT) net, is one of several mathematical modeling languages for the description of distributed systems. It is a class of discrete event dynamic system. A Petri net is a directed bipartite graph that ...
spetri * RDF
semantic annotation An annotation is extra information associated with a particular point in a document or other piece of information. It can be a note that includes a comment or explanation. Annotations are sometimes presented in the margin of book pages. For anno ...
s (only in SVG output)rdf * Special
shape A shape or figure is a graphics, graphical representation of an object or its external boundary, outline, or external Surface (mathematics), surface, as opposed to other properties such as color, Surface texture, texture, or material type. A pl ...
s and
symbol A symbol is a mark, sign, or word that indicates, signifies, or is understood as representing an idea, object, or relationship. Symbols allow people to go beyond what is known or seen by creating linkages between otherwise very different conc ...
sshapes.geometric and shapes.symbols *
Magnification Magnification is the process of enlarging the apparent size, not physical size, of something. This enlargement is quantified by a calculated number also called "magnification". When this number is less than one, it refers to a reduction in siz ...
of part of a graphic in an insetspy * Paths in SVG syntaxsvg.path *
Tree In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
strees *
Turtle graphics In computer graphics, turtle graphics are vector graphics using a relative cursor (the "turtle") upon a Cartesian plane (x and y axis). Turtle graphics is a key feature of the Logo programming language. Overview The turtle has three attribute ...
turtle * Zooming and panning graphicsviews


Gallery

The following images were created with Ti''k''Z 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. File:Periodic-table-of-chemical-elements.sv
Periodic table of chemical elements
(libraries used: calc, shapes) File:Rooty-helix.sv
Rooty helix
(library used: calc) File:LighthouseMap.pd
Mind map of ''To the Lighthouse''
(libraries used: mindmap, shapes.misc) File:Lda-gauss-variance-big.sv
Plot of two normal distributed variables with big variance
(libraries used: arrows, positioning) File:Hypersurface-3.sv
Hypersurface rendering
(libraries used: arrows, calc, decorations.markings, intersections, positioning) File:Bayesian-gaussian-mixture-vb.svg, Bayesian Gaussian mixture model (libraries used: arrows, backgrounds, calc, fit, matrix, patterns, plotmarks, shadows) File:Capacitor equivalent circuits.svg, Capacitor equivalent circuits (library used: arrows) File:Batezbestekoak frogak eskema 001.pdf, Diagram showing different types of mean-tests (libraries used: arrows, shapes) File:3d-gradient-colored.sv
Gradient plot of a function
(library used: arrows.meta) File:Csv-2d-gaussian-multivarate-distributions.sv
Multivariate Gaussian distributions
(libraries used: arrows, positioning) File:Feed-forward-perceptron.sv
Feed-forward perceptron
(libraries used: arrows, arrows.meta) File:Shield of the Trinity with the Four Relations.svg, Shield of the trinity with the four relations (libraries used: graphdrawing, graphs, quotes) File:English Length Units Graph.svg,
English length units graph English usually refers to: * English language * English people English may also refer to: Peoples, culture, and language * ''English'', an adjective for something of, from, or related to England ** English national ide ...
File:Graph homomorphism into C5.svg,
Graph homomorphism into C5 Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties * Graph (topology), a topological space resembling a graph in the sense of discr ...
(library used: calc) File:Krausz-Partition 2.png, Subgraphs of the Krausz partition of a given line graph File:Adjacencylist array of linkedlists undirectedgraph.svg, Adjacencylist of a graph implemented as array of linked lists (libraries used: arrows, calc, positioning, shapes.multipart)


See also

*
Asymptote (vector graphics language) Asymptote is a descriptive vector graphics language — developed by Andy Hammerlindl, John C. Bowman (University of Alberta), and Tom Prince — which provides a natural coordinate-based framework for technical drawing. Asymptote runs on all major ...


References


Further reading

*
Conference talk video
(version archived by archive.org; the previous site is unavailable) based on an earlier version of that paper. * Comparison of several graphics systems in LaTeX. * According t

"It contains a detailed introduction to the TikZ suite—probably one of the best existing descriptions of this highly useful package."


External links


PGF/Ti''k''Z
on
CTAN CTAN (an acronym for "Comprehensive TeX Archive Network") is the authoritative place where TeX related material and software can be found for download. Repositories for other projects, such as the MiKTeX distribution of TeX, constantly mirror mo ...

PGF/Ti''k''Z manual
on
CTAN CTAN (an acronym for "Comprehensive TeX Archive Network") is the authoritative place where TeX related material and software can be found for download. Repositories for other projects, such as the MiKTeX distribution of TeX, constantly mirror mo ...

PGF/Ti''k''Z gallery at TeXample.net
{{DEFAULTSORT:Pgf Tikz Cross-platform free software Free TeX software Graph description languages Graph drawing software Object-oriented programming languages TeX SourceForge projects Vector graphics markup languages