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
85 views

Normalized tangent vectors along a curve

I am using the following code to add the tangent vector at various points along a curve. I would like to normalize each vector, thus resulting in tangent vectors of equal unit length. How might I ...
9
votes
0answers
110 views

Is print in TikZ's math, useless?

In the manual of TikZ 3.0.0, the section about the math library, we can read (p. 635): Unlike the print keyword, the brace notation can be used in functions so that tikz path commands can be ...
2
votes
2answers
54 views

Vertically center tikzpicture in table

I'm tryin to vertically center a tikzpicture in a table. Here's a not-very-minimal example: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} % UFT8 - danske bogstaver og andet godt fra havet ...
5
votes
1answer
91 views

How to make a graph inset

I have a graph where I want to place another graph as an inset. I now have the following code which creates an inset graph on the bottom left corner. How can I move the inset to the upper right or ...
2
votes
2answers
68 views

Picture and Table centered alignment

this looks messy right now. How can i achieve the following: Caption of picture is centered under the picture and caption of table is centered under the table. Both captions are on the same vertical ...
7
votes
3answers
153 views

pgf plot and foreach loop

I have this function y=a*x^2 where a changes (-2.4,-2.1,-1.8,....,2.1,2.4) and i want to draw it with pgf plots. Problem is i dont know how to implement this i think i'll need foreach loop or ...
2
votes
1answer
59 views

How to measure the distance of two points? [duplicate]

My question is this. Is there a way to measure the distance of two points? (The points are drawn with TikZ.) Thank you for your answer.
1
vote
1answer
25 views

creating a background for a group of nodes

How can I put a background for a group of nodes (but the group of nodes is created before drawing the background). The problem is that if I draw a rectangle before creating the group (i.e. before ...
4
votes
3answers
86 views

Positioning a node with respect to a group of nodes

I have a set of nodes that is generated by a macro, and I would like to position a node with respect to the north, west, south of this set of nodes. In my example I would for instance like to position ...
2
votes
1answer
56 views

Shorten line without moving arrowtip in PGF 3.0

I have this arrow style in PGF/TikZ 3.0: \tikzset{myline/.style={double distance=0.8pt, line width=0.4pt, -{>[length=2.5pt,width=4pt]}}} It produces this result: As you can see, the double ...
4
votes
2answers
100 views

How to include multiple pdf pages using \foreach as tikzpicture?

I know how to include pdf pages using package pdfpages and do it all the time, but always had problem with getting the page centered and scaling. I am now trying to learn how to use tikzpicture to ...
3
votes
1answer
67 views

How do I draw arrow in my figure, such that the arrow points to a particular node?

I have a figure of a graph with 8 nodes. I want to draw arrows, s.t. they will point to some of the nodes (for example I want to draw arrows pointing to 4 of the nodes). Also, next to each arrow I ...
3
votes
1answer
95 views

Venn diagrams for 4, 5, and 6 sets in TikZ?

I'm trying to reproduce the following Venn diagrams in TikZ: Venn diagram for 4 sets: Venn diagram for 5 sets: Venn diagram for 6 sets:
3
votes
3answers
66 views

Hereditary properties with nested frames (mdframed and tikz)

When nesting an mdframed environment in a mdframed environment that uses tikz, it seems that the nested mdframed environment takes on many of the properties of the environment isn't being nested in, ...
3
votes
4answers
192 views

How to create a rectangle filled with image using TikZ?

I want to create a rectangle with tikz and fill it with a predefined image. For example the following line fill the rectangle with a color. How can I fill with my images instead? ...
2
votes
2answers
69 views

How to create a text box using PGF

I'm styling my beamer presentation using PGF picture and I want to add a textbox with a specific width. The following line doesn't provide a width parameter. ...
3
votes
0answers
25 views

Tikz addplot from csv-table with fill between depending on sign

this is Follow-up question from tex.exchange. I tried what was suggest as comment but that didn't work. The question remains with following adding: I read data from a table and plot it and then ...
10
votes
2answers
173 views

How do I typeset this diagram used to explain folding?

How do I typeset this: (this is an explanation of the folding used in derivation) Edit: Here's a code of the formula and XeLaTeX MWE: \documentclass{article} \usepackage{fontspec} ...
3
votes
3answers
131 views

How to put tikzpicture nicely between paragraphs?

I want to put my tikzpicture nicely between paragraphs. How do I do that? I do not want to put it in a picture environment because than there is extra space underneath. ...
2
votes
1answer
63 views

tikz: How to pass a list as a parameter of a tikz macro and use it in a foreach inside the macro

I am trying to write a macro for drawing some graph, but since the content of each node is specific it has somehow to be passed as a list to the macro. Here is an example of an ad-hoc code of what I ...
2
votes
1answer
40 views

Change direction of arrowheads

Im trying to draw a path in tikz, using Paul Gaborit's solution here TikZ: How to draw an arrow in the middle of the line? I managed to get this, where the path would be the half of the annulus. ...
1
vote
1answer
72 views

How to dress a stakel coins?

I can draw a cylinder, but I can't display the coins. \documentclass{article} \usepackage[margin=15mm]{geometry} \usepackage{tikz} \usetikzlibrary{shadings} \begin{document} \begin{center} ...
2
votes
0answers
31 views

Why I can not place two figures next to each other? [duplicate]

I want to display two figures next to each other. To do so, I used this webpage http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures for reference, but it didn't work. Instead of ...
0
votes
1answer
51 views

How do I add description of a picture drew with TikZ package? [duplicate]

I wanted to add a figure into my TeX file. To do so I drew it like a picture with TikZ package. I want to add description of the figure and to add reference of the figure, i.e. to say something like ...
3
votes
2answers
137 views

How to create this diagram in tikz

I am newbie in tikz and I would like to create a contour for a math document. Is it possible to produce the following diagram in tikz? If not, could you tell me an 'easy' solution other than the ...
1
vote
1answer
85 views

Calculating with different types of variables

Is there any way to calculate the height of a node in a tikz pictures and to divide a length by an another length to get a counter and to round it up? If yes where could i read after the subject of ...
5
votes
1answer
51 views

Why is the TikZ Spy coordinate system different than for the rectangle's?

Problem I copied some code from here and here and combined the best parts for my work. I am wondering why the coordinates for my rectangle are in percentages of the image while the coordinates of the ...
3
votes
1answer
113 views

Undefined control sequence: \pgfmath@multiply@thousand [duplicate]

After updating my MiKTeX distribution, I suddenly got a compile error with a .tex file that compiled perfectly fine before. After removing everything that did not contribute to the error, I ended up ...
2
votes
2answers
72 views

Tikz addplot fill between depending on sign

i have following problem. I read data from a table and plot it and then fill the area between the x-axis and the curve. This works fine. Well at least a bit. I want the "negative part" filled in ...
2
votes
1answer
42 views

How to vertically center the cells of one column in a TikZ matrix?

Is it possible to vertically center the cells of one column in a TikZ matrix? Adding nodes = {anchor = center} vertically centers all of the cells, but I would like to retain the bottom alignment of ...
2
votes
1answer
46 views

Improve flow chart template with rectangle split

I'm try to build a flow chart template: \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,amsfonts,amssymb,graphicx} \usepackage[left=2.00cm, right=2.00cm, ...
0
votes
1answer
115 views

how can I draw a functional graph in tikz?

Let X is a finite set and $f:X \rightarrow X$ is a function. how can i draw the graph with vertex V=X and edges (x,f(x)) with x in V?
1
vote
2answers
113 views

TikZ: Draw angle with label between lines

How do I draw an angle with a label between two lines when the lines are not necessarily drawn in the same \draw call? I need to draw an angle with a label, theta, between the y-axis and the pendulum ...
2
votes
2answers
56 views

Add axis label to bar chart using tikz

I'm creating a bar chart using the following code: \documentclass[tikz]{standalone} \usepackage[english]{babel} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} ...
6
votes
1answer
134 views

Recursion of unknown origin: TeX capacity exceeded, sorry [input stack size=10000]

For some reason, there's a recursive definition in this MWE. Who can find where it goes wrong? \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} \usepackage{tcolorbox} ...
10
votes
2answers
205 views

TikZ/TeX: Minimum line width/maximum resolution

I would like to employ TikZ for some constructive work, namely, programming a FabLab laser cutter. This nifty device gets a 2d drawing (as PDF) and cuts along all hairlines in the PDF. A harline is ...
1
vote
0answers
52 views

help with subplot tikzpicture please

I want to plot these two stacked bar plots as a subplot in one figure next to each other here is the code and my current output \begin{figure}[htbp] \centering \subfigure[Weight ...
4
votes
1answer
36 views

How can I label forest nodes automatically, adding labels as prefixes to nodes' content exactly once?

I was trying to figure out how you might get forest to label the nodes in a diagram such as the one featured in this question automatically. So, the idea is that: level 0: content of node should be ...
5
votes
2answers
87 views

Option in usetikzlibrary

Is it possible to have an option to an \usetikzlibrary command? I would like to define different styles when an option is activate. For example: \usetikzlibrary[blue]{something} ...
4
votes
2answers
106 views

How to save the current color in PGF/TikZ?

In TikZ/PGF, we can obtain the current line width using \pgflinewidth. Unfortunatelly there is no (as far as I know) \pgfstrokecolor, \pgffillcolor, \pgfstrokeopacity and \pgffillopacity. My main ...
3
votes
2answers
72 views

Tikz \draw as part of style (Drawing something inside each node of certain type)

I'm currently learning how to use Tikz and was looking into drawing automata (specifically Simulink-like state models). Currently, I'm making a style that should reduce my efforts to a minimum when ...
3
votes
0answers
80 views

Draw geodesic acceleration

Hi I want to draw some geodesics accelerating towards one another using TikZ. I've stolen some code from an online example to set up two planes one on top of the other (top one invisible - I'm just ...
4
votes
1answer
51 views

Smooth out drop shadow at the edge of the graph in pgf-blur

I'd like to smooth out a drop shadow about some specific places below my graph. I can't figure out how to do it, there's no key in the pgf-blur library that allows me to customize the the shadow ...
0
votes
0answers
39 views

Including tikz causes error

I want to include a diagram drawn in Dia using tikz, however when I include the tikz package i get the following error ! Package pgfsys Error: Driver file ``pgfsys-dvipdf.def'' not found... I'm using ...
0
votes
2answers
94 views

How to make an HTA looking thing?

I am try achieve something along the lines of this: I cannot however figure out how to make these arrows. I have some code that gives me something that is almost right but it is messed up in some ...
3
votes
2answers
173 views

How to reproduce these images with Tikz/ pgfplots?

I'm completely new to latex and Tikz, and I'm trying to reproduce these two images: Here's all I've got so far: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} ...
2
votes
2answers
75 views

TikZ ER Diagram - stopping relations from drawing across cells

I've adapted code from this post The problem that I'm having is that the relations (lines) between tables are crossing over tables rather than going around them. The MWE is quite long but here it ...
1
vote
1answer
62 views

How to position a TikZ picture?

I have a problem with positioning a TikZ picture. I want to position a half circle, but I don't know how I should do it. \begin{tikzpicture} \draw [domain=0:180] plot ({cos(\x)}, {sin(\x)}); ...
3
votes
1answer
51 views

Tikz: Curved parallel arrow around a circle [duplicate]

I have a simple following code: \begin{tikzpicture} \draw[thick] (2,0) circle (1.5cm); \end{tikzpicture}` I would like to create a curved parallel naming arrow around this circle as shown in the ...
3
votes
1answer
49 views

Label distance and other issues in a TikZ diagramm

The following figure computed with tikz includes three imperfectnesses: The math operators plus "+" and minus "-" are defined as labels of the corresponding sum nodes. The signs are drawn too far ...