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)

6
votes
5answers
2k views

Draw an aircraft with Tikz

I want to draw a plane using the Tikz tool. You will find, attached, a screenshot.
14
votes
1answer
877 views

Drawing relationships between elements of a database

I am looking into a feasible way of drawing relationships between Elements from a database. An example: Element x is related to Element Y via the Role "sister". Relationships exist in the form 1:1, ...
12
votes
3answers
510 views

tikz declare function and babel french option

I would like to declare functions in tikz for multiple uses of the same function within the code. Sadly, it seems that the tikz "declare function" is not compatible with the french option in babel. ...
11
votes
3answers
686 views

TikZ parallel Edges between Nodes

I'm looking for a simple way to draw the following picture using TikZ. Namely, I would like to only specify the coordinates of the cities and then to connect them by edges using a \foreach loop. This ...
7
votes
2answers
2k views

Centering a TikZ picture around an area

I often find myself in the following situation: A tikzpicture of mine consists of a main area and some outer material like text labels which are hardly symmetric around the main area. If such a ...
17
votes
2answers
4k views

Problems with TikZ calculations

When can I use functions and do calculations in TikZ? How do I make this work: \draw (0,0) arc(0:90:sqrt(15)); %not ok why is this working: \draw (0,0) arc(0:asin(1):5); %ok with ...
10
votes
1answer
177 views

Error with hobbyconvexpath

The hobby examples given on TEX.SX don't seem to be working with texlive 2013 (at least for me. For example, copying an MWE produces an error: \documentclass[tikz,border=2bp]{standalone} ...
5
votes
2answers
680 views

Nested foreach inside a TikZ matrix for both rows and columns

I'm trying to create a matrix using nested \foreach loops. I tried following the example I found in a previous question, but I keep getting errors. Here is the code I tried to run: ...
31
votes
5answers
6k views

How can I use TikZ to make standalone (SVG) graphics?

I would like to use TikZ in other settings than TeX and I'd especially like to use the drawings on websites where the text should be searchable and selectable. However, I'm unsure of the best way to ...
34
votes
6answers
2k views

Creating gears in TikZ

I am trying to create a gear in TikZ in which the number of spikes can be determined and the size as well. I was looking through the pgfmanual and stumbled upon the decorations section and I tried a ...
39
votes
3answers
9k views

Drawing Mechanical Systems in LaTeX

I really like CircuiTikZ for drawing diagrams in my LaTeX documents. However I mostly draw mechanical and not electronic systems, which is why I'm looking for some similar way to draw mechanical ...
31
votes
4answers
5k views

Draw mechanical springs in TikZ

Currently I am using the following path style to draw springs in TikZ \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.1cm,post length=0.1cm,segment length=6}] for example ...
36
votes
6answers
11k views

TikZ: Node at same x-coordinate as another node, but specified y-coordinate?

In TikZ, if I have a node (A), how do I create a node (B) with the same x-coordinate as (A), but a given y-coordinate?
22
votes
1answer
5k views

Simplest way to overlay a text + rectangle label an image?

For my figures thus far I've been using LaTeX's straightforward figure code, i.e.: \begin{figure} \centering \includegraphics[width=6.5in]{figure.png} \caption[Stuff here]{(A) More stuff ...
19
votes
5answers
5k views

Label angle with tikz

I am able to draw a nice right triangle with \begin{tikzpicture}[thick] \draw (0,0) -- (4,0) node[midway,below]{$f$} -- (4,2) node[midway,right]{$\frac{x}{2}$}-- cycle; \end{tikzpicture} Now I ...
11
votes
1answer
10k views

Typesetting a directed, weighted graph with TikZ

I just started doing things with TikZ today and I run into a problem: there is just no example code snippets for typesetting directed, weighted graphs. Can anyone supply one simple example in an ...
25
votes
5answers
2k views

How can I fix jumping TikZ pictures in beamer?

The problem of stuff jumping in beamer is a common one, (see e.g. Avoiding jumping frames in beamer) and we've seen it here from time to time (I imagine the "related" list at the side will be quite ...
21
votes
6answers
2k views

Best way to create this image, square and angle

I have just started looking into tikz, and trying to create the simple image below. I took a stab at it but could not quite do it. ABCD is a square and E is the midpoint on DC and F is the midpoint ...
11
votes
2answers
890 views

Issues and potentiality of the tikzmark macro: dynamic box adaptation

Since I discovered the tikzmark macro I've been enthusiastic about it. I think that it is possible to distinguish at least two versions of the command: a basic one (two examples: ...
18
votes
3answers
1k views

Letterpress effect through PSTricks or Tikz

I have already typed in the META section of the website a post addressing the question as to how the letterpress (or engraving-like) effect in the headers of the site had been achieved. I know it can ...
15
votes
4answers
663 views

How can I draw a TikZ element multiple times against a shaded background?

If I have two tikzpictures drawn: \documentclass{article} \usepackage[margin = 1in]{geometry} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,calc,shapes,shapes.geometric,patterns} ...
10
votes
2answers
1k 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 ...
16
votes
2answers
3k views

Trait with variable thickness

Can you create lines with variable thickness (line width) in Tikz?
9
votes
3answers
849 views

Replicate this chart using LaTeX

I need to replicate this chart using LaTeX, I understand that TikZ should come in handy: Can anyone please show me the best and easiest way to render the chart? Any ideas, tips, nudges in the right ...
16
votes
1answer
1k 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 ...
7
votes
1answer
489 views

Is there something like \providetikzstyle similar to \providecommand?

I have standalone figures that I include in my document. These figures use statements like \providecommand{\HypotenuseLabel}{$h$} which allows the figure to have a default label, and which can be over ...
15
votes
4answers
4k views

In TikZ, is it possible to nest nodes?

My use case: I am drawing chemical schemes. Each molecule contains several nodes. However, I also want to put each molecule into a "wrapper" node, so that I can use the usual anchors in combining ...
101
votes
12answers
6k views

Can we make a love heart with LaTeX?

I understand that this post may cause some down votes because it seems a bit off-topic, but having seen the discussion on Christmas Tree with LaTeX I am still willing to try. My Girlfriend's birthday ...
66
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 ...
66
votes
6answers
3k views

What is the minimum one needs to know to use TikZ?

I am fed up with the poor quality of the pictures in the papers written by my graduate students and am trying to convince them to use TikZ. I know of three ways to begin learning TikZ: The TikZ ...
44
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
28
votes
3answers
10k views

Add more anchors to standard TikZ nodes

I frequently find myself needing more than the standard anchors TikZ nodes provide, i.e. north, north east, east and so forth. I usually use coordinate calculations for this, as in the example below, ...
36
votes
5answers
11k views

What You See is What You Get (WYSIWYG) for PGF/TikZ?

Are there any WYSIWYG editors for PGF/TikZ? Perhaps something similar to LyX but for PGF/TikZ? If there is no WYSIWYG editor for this tandem, is there one perhaps that allows the user to easily ...
23
votes
8answers
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: ...
17
votes
1answer
3k 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 ...
21
votes
1answer
1k 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 ...
21
votes
2answers
988 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 ...
10
votes
3answers
6k 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 ...
22
votes
2answers
2k views

How can I produce a 'ring (or wheel) chart' like that on page 88 of the PGF manual?

I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the ...
28
votes
1answer
369 views

How can I know if a node is already defined?

I think I've seen this question before, but I can't find it. The problem is simple; before I assign a name to a node I would like to know if the name is already used. I think when a node is created ...
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 ...
24
votes
3answers
4k views

Using math in TikZ

I know it has been asked and answered before, and I need to put { and } around it, but for some reason this doesn't work: \draw (0,0) -- ({atan(1)}:{sqrt(2)}); Any idea why?
19
votes
2answers
714 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 ...
14
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 ...
20
votes
4answers
949 views

How to draw a Catalan number diagram on TikZ

This is a very easy question, but I am a LaTeX newbie. Any idea how to code diagrams of this kind? Image taken from the Catalan number Wikipedia page.
19
votes
4answers
6k 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?
19
votes
2answers
3k 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 ...
18
votes
4answers
2k views

Bounding box is larger than expected when drawing a curved path

I have been working on logo for my department and I have the following code. The problem is that whenever I compile the diagram seems to be larger than the actual logo. I do not know what is the ...
13
votes
2answers
3k 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 ...