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)

2
votes
0answers
52 views

X-Y plot with variable diameter points [duplicate]

I want to draw an X-Y plot where each point has a kind of "third dimensional" value that I want to represent using different points "size" (points are circles with different diameters). I already ...
21
votes
2answers
1k views

Heatmap over country like Google Map

Is there a way to make a map similar to Google Map heatmap/marker cluster? I know that I can put in a picture, but I just want to make sure whether there is any alternative in LaTeX.
8
votes
2answers
387 views

Drawing iterations of a recursive structure in TikZ / using node names defined in a loop

This is my first time using TikZ, and I'm trying to draw something related to the Hilbert space-filling curve, based on a recent popular article (HTML, PDF). Specifically, I'm trying to draw the first ...
11
votes
2answers
316 views

Successively reveal tree bottom up

I am trying build a tree bottom up in a beamer document, i.e. to draw it on screen starting from the most deeply embedded leaves. I've found a lot of Q&As and discussions on how to have trees ...
4
votes
2answers
282 views

Scaling tikz-cd labels

I'd like to scale a custom symbol drawn in tikz, such that it's the same size as surrounding text in a tikz-cd diagram. For example, in the following code I'd like the box to the left of A_2 to be ...
7
votes
2answers
468 views

Resetting numerical labels in \foreach commands on a numberline

I am looking to create quick number lines. What I have so far is this: \documentclass[letterpaper,12pt]{book} \usepackage{tikz} \usetikzlibrary{shapes,snakes,backgrounds,arrows} \begin{document} ...
2
votes
3answers
157 views

Grouping two lines inside align environment to put smth. to the left of them

I have an equation which is alligned at 1st equal sign like this: \begin{align} a &= b + c \nonumber\\ d &= e + f \label{eq1}\\ %this is row 1 g &= h + i \nonumber\\ %this is ...
2
votes
1answer
154 views

tikz, how manipulate with a series of nodes as one object

This code draws sequence of words, each word in a separate block. I want to manipulate it as one block. For example, how can I get next picture? (I want to add $\rho$ in front of it). ...
10
votes
2answers
690 views

Fill the area enclosed by multiple functions in a single plot

I wish to fill the area enclosed by four functions, as indicated by the hatching in red in the figure below: So far I've been able to fill the area between each pair of functions, as shown below: ...
1
vote
1answer
848 views

How to adjust or move the labels of arrows in tikz matrix of math nodes

I am trying to label crossing arrows in my tikz-matrix diagram. By default, the label is placed half-way of the path. Since the arrows cross half-way too, the labelling becomes ambiguous: How can I ...
3
votes
1answer
378 views

tikz, modify code for drawing DNA sequence

I need to modify how to draw DNA sequences. There is a function \DNASequence which does the job. It uses nodes of constant size. However, I need to put arbitrary text instead of only one letter in a ...
4
votes
1answer
465 views

How to insert a linebreak in a TikZ matrix node?

How can I get a linebreak inside a matrix node? The following gives the error: Package tikz Error: Giving up on this path. Did you forget a semicolon?. unless I remove the linebreak. ...
4
votes
3answers
357 views

Tikz, how to make underline brace

How can I make underline brace for part of formula y+z in a tikzpicture below? I am aware of underbrace in math mode, but I want the brace be outside of a revblock. \begin{tikzpicture} ...
8
votes
1answer
194 views

Integer related issue in the domain of a function. It works with 1.0 but not with 1

I write a little script to draw a line with a Gaussian pulse. I define some commands (\verticalSpace, \HorizontalSpace and so on) to parametrize the figure. In particular, I define \length to set a ...
4
votes
2answers
3k views

drawing a line in polar coordinates

I have a point in polar coordinates (110:2cm), but from here I want to draw a line straight down. Doing (110:1cm) is a line towards the center along 110 degrees. Without taking 2*sin(110) and ...
3
votes
1answer
406 views

How to draw a diagram with boxes of text inside each other and have them laid out automatically?

How do I make a diagram of the following structure where each element is a box with text and possibly sub-elements. Here is an example of the desired structure. The sizes and alignment of the boxes ...
3
votes
2answers
730 views

How could I center the text in a rectangle split node?

I use TikZ to create pictures in LaTeX. My picture consists of a rectangle with nine split parts. Every part has its own text inside the node, for example, "local variables, and temporaries": ...
7
votes
1answer
508 views

Align pinned nodes in PGFplots

I'm working with plots generated from matlab2tikz and I have several plot lines close to each other. Labeling them is proving difficult, but I believe a good looking solution could be to list the ...
1
vote
0answers
606 views

Why can I compile a tikzpicture perfectly in one chapter but not in another? [closed]

I am having trouble with including a tikz flow chart in my code. In my preamble I have included \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{shapes,arrows} and this is the flow chart: ...
39
votes
1answer
1k views

Table in the shape of an arrow

Is it possible (and not too difficult) to draw a table in the shape of an arrow? I think it's best explained giving an example: I'd like to draw a table almost exactly like this. However, the 2nd, ...
11
votes
4answers
439 views

Curved arrow describing a step in a mathematical derivation

Is it possible to achieve something like this in LaTeX? I want a curved arrrow pointing from 1st line to the other line and is coupled with an equation number which indicates the equation used. I ...
26
votes
4answers
953 views

Can fuzzy borders be added to external pictures programmatically?

In my opinion, external pictures are often more pleasing to the eye on a white background when they have fuzzy rather than "sharp" borders. For instance, compare this to that Adding fuzzy ...
1
vote
0answers
105 views

Issue with PGFPlots text [closed]

I'm trying to generate some plots using TikZ, with the following code: It's not about babel, fontenc, or inputenc; I've tried removing them to no avail. \documentclass[a4paper]{article} ...
6
votes
2answers
425 views

Scaling the sieve of Eratosthenes in TikZ

Consider the following code, taken from Alain Matthes' answer here. Code \documentclass{article} \usepackage{tikz} \makeatletter \pgfutil@ifundefined{pgfmath@function@isprime}{% ...
3
votes
2answers
1k views

TikZ picture positioning in landscape

I wrote a large game tree (using automata package) and need to display it in landscape mode. I already tried to use both textpos and geometry (newgeometry command) packages but without any positive ...
8
votes
1answer
1k views

Computing value using pgfmath for use in coordinates?

Why can't I use the outcome of using pgfmath in a TikZ coordinate? Here is a (minimal) example that does not work: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} ...
9
votes
1answer
429 views

Connecting nodes with brace in TikZ

How would be possible to put a brace instead of a "line" connecting nodes and add some text above it with TikZ?
2
votes
1answer
423 views

coordinates, nodes and arrows in tikz

I like the idea of defining a bunch of coordinates and then creating the desired diagram from them, but now I have the following problem. The MWE below demonstrates it: the arrows connecting the two ...
3
votes
2answers
521 views

LaTeX - PGF groupplot - polar axis

I can't find the answer anywhere, is it [and how] possible to make a group plot of multiple polar graphs? For grouping, I use pgf.groupplot library, for polar axis, I use \begin{polaraxis} from pgf ...
3
votes
2answers
895 views

Contour integrals

I checked this post in here Drawing complex integration but what I want is draw the one that exclude zero and negative real numbers instead of positives. I tried to play around with the code in the ...
13
votes
3answers
898 views

Drawing a 3D cone

I want to create some thing like this , but instead of a box, I use another object (a dog silhouette). Here is what I have so far \begin{tikzpicture} \begin{scope}[scale=0.25, xshift=70, ...
6
votes
1answer
1k views

Change TikZ nodes color to grayscale

Say you have some code like this: \documentclass{standalone} \usepackage{tikz} % \PassOptionsToPackage{monochrome}{xcolor} \begin{document} \begin{tikzpicture} % \selectcolormodel{gray} ...
1
vote
1answer
151 views

How to set the distance between to subfigures each with a tikz-pic inside?

My code is as follows. I want to increase the distance between the two diagrams: \PassOptionsToPackage{usenames,dvipsnames,svgnames,table}{xcolor} \documentclass [11pt,a4paper] {article} ...
1
vote
1answer
408 views

Using Tikz Fit to draw a node covering a Tikz chains

A chain of nodes is drawn using tikz chains. I would like to draw a rectangle node covering the chain nodes (or, multiple rectangle nodes covering subsets of them). I am using tikz fit. ...
2
votes
3answers
254 views

Adding nodes to specific positions and without circles around them(but only labels)

Based on a previously asked question by me I already have the following code: \documentclass [11pt,a4paper] {article} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \usepackage{amsmath,tikz} ...
9
votes
1answer
483 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? ...
6
votes
4answers
980 views

Brace diagram in TikZ

I apologize if this has already been covered in some other posts, but I couldn't find it anywhere and I'm not even sure if "brace diagram" is the correct name in English. I have found some examples ...
4
votes
1answer
1k views

Put numbers in legend using pgf pie

I would like to have the numbers that are inside the pie chart to be in the legend. How can I make that happen? Here is the MWE: \documentclass{article} \usepackage{pgf-pie} \usepackage{tikz} ...
3
votes
1answer
564 views

How to put nodes or rectangles inside a node?

I've created a chain of nodes. In each of those nodes, I want to put other rectangles with text inside. This is how I want each chained node to look like (please excuse my touchpad drawing): I ...
17
votes
1answer
851 views

Brackets around matrices in TikZ

I'm writing a custom package for labeled matrices using TikZ. I noticed an inconsistency in TikZ. This is best illustrated with the following MWE: \documentclass{standalone} \usepackage{tikz} ...
3
votes
0answers
564 views

“No shape named intersection-1 is known” error in TikZ [closed]

I want to draw a circle with arrows ending not perpendicular but straight on the surface. I managed so far to draw the paths I need and I already read about the naming of paths, but I get an error as ...
2
votes
1answer
164 views

What packages do I need to learn as developer to learn LaTeX?

I am a web developer and I often have the need to convert the the webpage to pdf. I have just discovered latex and pretty much liked it. But as there are many packages available , I am not into book ...
4
votes
1answer
272 views

Autoconnecting tikz-matrix nodes

I have this flowchart: \documentclass[tikz]{standalone} \usetikzlibrary{shapes,arrows,matrix,decorations.markings} \begin{document} \tikzset{ base/.style={draw,minimum width=2cm,minimum ...
6
votes
1answer
2k views

Horizontal alignment of text nodes of varying length in Tikz matrix like in Tex tabular

In tablular, we use {r|c|l} to define alignment. Is there anything similar for Tikz matrix. For example, by using matrix, the following MWE produces matrix of nodes, which appear to be center aligned ...
3
votes
1answer
366 views

Create a banner for section style

I am wondering if there is any way to change the default style for sections. I would like to create a banner (across the page) with a dark-gray background and the section title in white. It would be ...
27
votes
6answers
1k views

Design of an asteroid belt in TikZ

How can I construct an asteroid belt in TikZ? That is my question: I get everything right, but I do not know how to make the asteroid belt. I have no code to add besides the preamble with TikZ ...
1
vote
1answer
446 views

Pgfplot figure off-center

I create a tikzpicture in standalone mode (see code below). Then import the resultant .pdf file into my document via \includegraphics (see pic). However the axis labels are cut off and part of the ...
11
votes
2answers
609 views

How can I improve those voltage annotations

In France, we draw an arrow above or below a dipole to represent the potential difference between its two poles. I'm trying to automate this using the ideas of the tikz circuits library (not ...
3
votes
1answer
328 views

Draw an automaton with more states and bent arrows

I want to draw this automaton: But I drew it with a bad way !! \documentclass{article} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage[latin1]{inputenc} ...
0
votes
0answers
141 views

Create automata with LaTeX [duplicate]

I failed to create this automata with LaTeX: \documentclass{article} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage[latin1]{inputenc} \begin{document} ...