TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

learn more… | top users | synonyms (3)

5
votes
1answer
2k views

Tikz with positioning does not work with DVI

I have the following Tikz picture: \begin{tikzpicture} \node (a) {A}; \node [below=2cm of a] (b) {B}; \end{tikzpicture} When I compile this code with PDF-LaTeX, I get the expected result: "B" ...
13
votes
1answer
493 views

Moving tiles of the pattern in TikZ

One of the problems with patterns is that you never know how individual tiles are going to be laid over the area. E.g. if you use star pattern, sometimes stars on the left side of the area shall be ...
10
votes
3answers
2k views

'Standalone' TikZ pictures

I want to create a TikZ picture in an external PDF file, which then can be included in my main document via \includegraphics. However, compiling a document with a TikZ picture in it produces a whole ...
9
votes
3answers
375 views

Problem with babel and tikz using \draw

I'm trying the next code: \documentclass[pdftex,spanish]{article} \usepackage{babel} \usepackage{tikz} \begin{document} Simple arrow: \begin{tikzpicture} \draw[->] (-1.5,0) -- (1.5,0); ...
7
votes
1answer
429 views

Is there a way to clear paths previously defined with name path global in TikZ

In the solution to Intersections in PGFplots it was pointed out that each \addplot command was drawn in its own scope and using name path would not survive outside of that \addplot command. The ...
5
votes
1answer
2k views

Update TikZ/PGF on mac

the TeXLive 2012 distribution on my Mac is shipped with TikZ version 2.10 - I want to use (try) the CVS (most updated beta(?) version). Here's what I've done so far: Downloaded the the TDS package ...
62
votes
3answers
13k views

Putting a timeline for dates in moderncv

This question led to a new package: moderntimeline I just had the idea of using a timeline to specify dates in my CV. I've made a mockup in Inkscape: The idea, as you see it, is to display ...
69
votes
1answer
4k views

PowerPoint's “Smart Art” for TikZ?

This question led to a new package: smartdiagram I haven't been using PowerPoint for years, but today I immediately fell in love with its "Smart Art" feature (2010 version of PowerPoint). The ...
45
votes
2answers
2k views

Recreating a guilloche with TikZ

One of my last questions talked about certificates and I got great answers. Now my questions is, can one recreate a guilloche in TikZ like the one shown below: or may be a border like
36
votes
3answers
1k views

Replicate the Fourier transform time-frequency domains correspondence illustration using TikZ

The following time-frequency correspondence illustration is in the wikipedia entry of the Fourier transform. Also a gif animation version (if the animation doesn't show, please open the following ...
27
votes
4answers
9k views

How to draw a line passing through a point and perpendicular to another?

I'm having a bit of a headache right now as I can't draw this basic figure: A straight line goes through points A and B. Another line is perpendicular to AB and goes through an arbitrary point P. I ...
22
votes
2answers
1k views

Making TikZ nodes hyperlinkable

I have a TikZ tree. Now I want to make the nodes click-able directing to relevant sections in the document (or directed to URLs). Some of the content in the nodes are not text. Is it possible to turn ...
19
votes
1answer
4k views

Global variables for all tikz drawings in a document

Sorry if this question sounds too elementary. I am new to TikZ, although I have experience with LaTeX. Say I have multiple TikZ statements in a LaTeX document like the following: \tikz\draw[line ...
25
votes
9answers
6k views

Drawing polyhedra using TikZ with semi-transparent and shading effect

I would like to draw an Octahedron using TikZ, I found nowhere to start, I tried drawing 6 points and then connecting them properly, but this method gives no 3D feel at all, this is my drawing: ...
24
votes
2answers
6k views

How to draw a poset Hasse Diagram using TikZ?

I need to draw an Hasse Diagram using LaTeX. TikZ is the solution I would like to use. I tried with a simple structure involving trees but obviously when I need to join two nodes, it is not possible. ...
22
votes
1answer
2k views

Explanatory bubbles in beamer

In the MWE below I want to place an "explanatory bubble" (see picture inserted below) pointing to the word "Integer" in the 8th line (the bubble should superimpose the text, a transparency effect such ...
12
votes
3answers
7k views

Example of fancy table using TikZ package

Can anyone share me several fancy table templates? I want to make this thread like a reference so that each time I need a template, I could just go here. If you can, please provide a screenshot for ...
10
votes
3answers
1k views

Creation of a new poster template

Elena Botoeva has written a package with 5 templates for posters, called fancytikzposter, consisting of a unique TikZ picture. Her class had some success (see here) I am looking for a way to improve ...
27
votes
3answers
5k views

Using TikZ, how to draw an elliptical arc starting from point A to point B with the origin as its center where both radii are given?

I am new to TikZ and reading its manual now. For the sake of exercises, I want to draw Batman's logo as follows: Using TikZ, how to draw an elliptical arc starting from point A to point B with the ...
23
votes
2answers
2k views

Dotted lines in TikZ with round dots

Well, the title explains all, I guess. Sorry if this is too simple for all the TikZ gurus here: but I want a dash pattern like "dotted" for drawning but with round dots and not the little squares. How ...
17
votes
3answers
1k views

How to draw these diagrams (closed contours) using TikZ or PSTricks?

First, I must say I have no knowledge about PGF/TikZ nor PSTricks, but I would like to draw the following or similar closed contours using one of them or another adequate package. Where can I find the ...
23
votes
6answers
10k views

Package for pie charts

I want to create a pie chart in LaTeX. Do you know a package which manages that? I tried datatool which uses tikz as backend but seems to be unusable due to mysterious floating point errors.
19
votes
5answers
2k views

Outlining (filling) glyph outline with text in TikZ

Original question Is there any automated or semi-automated way of tracing outermost outline or whole path of letters in TikZ? That I would be able (e.g. by using positioned nodes) to draw a letter ...
11
votes
3answers
5k views

TikZ: Intersection of two lines

what is the easiest way to determine the intersection of two lines? I tried \usetikzlibrary{intersections} \begin{tikzpicture}[every node/.style={black,above right}] \draw[name path=line 1] (0,0) -- ...
8
votes
4answers
2k views

Neural Network representation

I would like to translate to Spanish a diagram that represents a neural network, the diagrama is something like this: I would like to clone the design and effects, so I need some examples to do ...
22
votes
4answers
9k views

TikZ: difference between \node and \coordinate?

What is the difference between \node and \coordinate in TikZ? Exchanging them does no visual effect in my (to be honest: still simple) pictures. When to use what?
20
votes
2answers
804 views

How to modify nodes in TikZ to automatically add a line on their top?

In TikZ there is the very flexible node system. As a beginner I am still stumbling over a few details. How can I modify a node or create my own nodes easily? As an example I need a node with a thick ...
15
votes
3answers
4k views

Image with axis

I need to plot some data in a file (10000 records of 2 points each one) but PGFPlots is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image without axis and in ...
15
votes
3answers
2k views

How to draw text-anchored tikz line below text instead of above?

I wish to mark several pairs of from/to anchor locations in text, and use tikz to draw lines between these. The anchors are not in absolute page locations; the text determines where the endpoints of ...
27
votes
6answers
3k views

What's the easiest way to draw the arc defined by three points in TikZ?

An ordered set of three points uniquely defines a circular arc, and I'd like to be able to draw that arc in TikZ. I know about the arc drawing command, which does the job given a radius, two angles, ...
21
votes
4answers
5k views

Is there a way to control whitespace around a TikZ picture?

When I draw a tikzpicture that includes paths, I get quite a bit of extra whitespace added around the elements of the picture. Depending on the elements the figure contains, this can work out in some ...
19
votes
2answers
4k views

\boxed{}, TikZ and colored equation background

I wonder if someone could provide me with a simple MWE for using TikZ together with \boxed to produce a colored equation background. If possible with rounded corners. I am using \boxed{} inside the ...
16
votes
6answers
556 views

Combining |- and !.5! in TikZ

How do I combine the !.5! operator with the -| operator? I want a node that has x-coordinate equal to the average of x coordinates of nodes A and B, and a y-coordinate equal to the average the y ...
12
votes
3answers
11k views

Beamer vs. TikZ: uncover nodes step-by-step

I'm trying to uncover a TikZ image piece-by-piece like so: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{frame}{Linearity} \begin{center} ...
19
votes
3answers
916 views

How to make a smarter cropping with standalone or preview packages?

The arrow tail at the bottom left corner is not properly cropped. \documentclass[tikz,border=0pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3,line width=3pt] ...
18
votes
3answers
4k views

Multirow/multicolumn cells in TikZ matrices?

Is it possible to make TikZ matrix cells span multiple rows/columns, like they can in LaTeX tables using \multirow/\multicolumn? Specifically, I'd like to typeset something like the following in a ...
16
votes
3answers
1k views

Draw a closed liquid-droped shaped curve with TikZ

I am trying to draw a closed liquid-droped shaped curve using TikZ, but I don't know how. I tried to draw it using coordinates but I don't think that this is the solution. I am using ...
13
votes
3answers
558 views

Repeated division - Converting from base 10 to another base

I am teaching how to convert from one base to another base, however, I can't find a way to do something like this: I know little about Tikz, the only thing I have been able to produce is a simple ...
11
votes
5answers
5k views

Commutative Diagrams and TikZ

I wish I knew how to draw the this commutative diagram with the TikZ package. I would also like to know how to put subtitles in the diagram.
10
votes
5answers
4k views

Diagonal strikeout starting too low and ending too high

I want to strikeout an equation with diagonal line but I've not managed to get the diagonal line to draw as I want. The closest I've gotten is via the first example in Frédéric's answer of \cancel ...
15
votes
2answers
2k views

How to align a series of TikZ pictures at the baseline

I am trying to align a series of pictures made up of letters, using TikZ. Having tried almost all combinations of the baseline key it is obvious I am missing something. Here is a MWE (currently ...
12
votes
3answers
3k views

Horizontal row separation line in tikz matrix (like \hline in tabular)

In this question tikz-matrix-as-a-replacement-for-tabular a nice solution was given to let the matrix in tikz behave like tabular. In this solution cell/.style={rectangle} was used to draw lines ...
11
votes
2answers
2k views

Coordinates of intersections

In axis environment I have a curve and a line intersecting it. How can I get components of intersection-1, intersection-2 etc. in axis units? \documentclass{minimal} \usepackage{pgfplots} ...
5
votes
3answers
430 views

How to submit a set of tikz command with pgfkeys?

I would like to send a serie of tikz keys to a tikz path with the pgfkeys interface. I succeeded with the following code but is there a simpler way to do that ? Can I do the same thing with something ...
21
votes
2answers
2k views

TikZ: multiple decorations on a path.

I would like to draw a squiggly line with an arrow somewhere in the middle of it. TikZ has a pathmorphing decoration that draws a squiggly line and a markings decoration to place an arrow tip. So a ...
17
votes
3answers
1k views

Using opacity in TikZ makes the entire page become “more coarse” when printed

In my document, some of the figures uses opacity. In the PDF viewer, everything looks fine, but when I print the document, the pages in which these figures appear become more "coarse"; the text looks ...
14
votes
2answers
6k views

Easiest way to plot a function with PGF/TikZ

I am new to TikZ and/or PGF (whatever the difference is :/), as you can see. Anyway, I need to draw the graph of the equation x^(2/3) + y^(2/3) = a^(2/3), where a = 2. Any suggestions? Here is what I ...
11
votes
1answer
3k views

Squiggly arrows in tikz

Is it possible to get a path in tikz that looks like \rightsquigarrow?
9
votes
1answer
327 views

How to vertically center the \vdots in this node?

I'd like the \vdots in this chain to have the same distance to both of the arrows. I know that I could manually shift the node so that it looks right, but there must be a better solution. How? ...
8
votes
1answer
902 views

Dependent node size in TikZ

I'm producing some control theory flow sheets in TikZ where I have specified the node box size. Since I'm making a lot of these flow sheets, I have set global styles for them, for instance the box ...