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)

11
votes
2answers
3k views

Insertion of perpendicular symbol at intersection of two perpendicular lines

This provides good details on How to draw a line passing through a point and perpendicular to another?. What I would like to do is to extend this somehow to add the usual geometry symbol to indicate ...
10
votes
2answers
2k views

How can I draw a Karnaugh map

Can you please help me drawing the kmap as shown in the link. A sample of the circles around the 1's is sufficient. *Edit** I made the following code. Can you help me now in completing this ...
5
votes
3answers
489 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 ...
5
votes
1answer
2k views

How to typeset a TikZ picture inside a node?

The contents of a node are drawn in text mode. Is there a way, short of introducing a tikzpicture environment, to draw a picture inside a node? Nesting tikzpicture environments is problematic, also ...
16
votes
1answer
2k views

How to create a squiggle arrow with some text on it in TikZ?

I need to define a new command to create a squiggle arrow with some text on it. Something similar to what \xrightarrow command produces but with wiggly arrows as in \rightsquigarrow. The length of the ...
15
votes
2answers
1k views

Tikz-PGF: Draw integral test plot

So I'm doing a report on convergence tests in LaTeX, and would like to produce a diagram demonstrating the integral test for convergence. I am somewhat new to LaTeX, and a total n00b when it comes to ...
10
votes
3answers
1k views

Drawing a proper shadow for overlapping objects

I draw images that are composed of several overlapping nodes. If I add a drop shadow to each node, the shadow of the second node is drawn over the first node, as seen in the picture below (which ...
10
votes
1answer
1k views

Foreach inside a TikZ matrix

Consider this MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix [matrix of nodes] { a \\ b \\ c \\ }; \end{tikzpicture} ...
6
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 ...
6
votes
5answers
3k views

How do I use pgfmathdeclarefunction to create define a new pgf function?

I'd like to define new function for pgf so I can use it in pgfplots. I'm trying to create a unit pulse function p(x) which has a value of 1 from x=0 to x=1, and 0 elsewhere. I read the pgf manual on ...
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" ...
11
votes
2answers
930 views

Tikz and babel error

This code works correctly: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture} \tikzset{ every picture/.prefix style={ ...
11
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 ...
7
votes
1answer
476 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
2answers
616 views

TikZ: Make node height span several others

How can I make the Z node span the total height of the ABCD column? My current code is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,positioning} \begin{document} ...
5
votes
2answers
2k views

Drawing network protocols

I want to produce network protocols, a very simplified example of which is depicted below: The protocol has two parties, each of which does some computation and then communicated with the other. I ...
68
votes
3answers
15k 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
5k 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 ...
76
votes
2answers
3k views

What are the new features in TikZ/pgf 3.0?

Since the December 20, 2013, we have new major release of the wonderful TikZ/pgf package: version 3.0.0! 1 Unfortunately, I was not able to find a nice human readable list of changes, that goes to ...
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
69
votes
3answers
39k views

How to scale a tikzpicture including texts?

It seems that the scale option scales only the length of lines, but not the size of texts. For instance, 1 and true and not scaled in the following code. \begin{tikzpicture}[thick, scale=0.6] \draw ...
36
votes
3answers
2k 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 ...
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 ...
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 ...
25
votes
9answers
7k 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. ...
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
2k 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 ...
30
votes
1answer
2k views

Topological Quantum Field Theory diagrams with pstricks or tikz

This question led to a new package: tqft — Blog: The TQFT Package I'm going to write a brief note about topological quantum field theories, so I need to draw some copies of the "pair of ...
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 ...
25
votes
2answers
4k views

Rounded corners only at one side of a TikZ node

How can I make rounded corners at one side (only right, only left)? \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node [fill=gray, rounded corners=10pt]{ ...
23
votes
2answers
3k 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 ...
24
votes
6answers
11k 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 ...
12
votes
3answers
6k 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 ...
34
votes
1answer
806 views

Poisson disc sampling implemented in luatex

In this answer by @Jake to the question Filling specified area by random dots in TikZ I learned about the poisson disc sampling technique to generate nice looking random patterns. Jake's answer ...
31
votes
4answers
2k views

tikz: Distribute evenly and randomly circles

I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape. The density should ...
21
votes
2answers
879 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 ...
20
votes
2answers
5k 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 ...
19
votes
2answers
3k views

Draw a prism in TikZ or PSTricks

Is there a way to define an polygon in plane and output an (orthogonal) prism with that polygon as its base? The prism should be drawn in 3D in parallel oblique perspective with controllable height h, ...
16
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
4k 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, ...
22
votes
4answers
6k 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 ...
16
votes
6answers
589 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 ...
15
votes
2answers
5k views

Need to do some changes to pgfplots axis

I am still in the habit of learning TikZ, barely started using pgfplots to create my images Although I am still not sure what the best way to do so is, I need to create the image below. My problems ...
13
votes
3answers
13k 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} ...
12
votes
5answers
6k 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.