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

output-directory and shell commands

Let's use a small example to use gnuplot to draw a nice function using tikz. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw plot[domain=-3:3,samples=100] ...
3
votes
0answers
55 views

Nodes linked by a horizontal arrow in enumerate environment [duplicate]

Alright, here's what I need. I need links between nodes a la tkz-linknodes, but, unlike that package, I need linking arrows that appear beneath the sentence as opposed to linking arrows that appear in ...
1
vote
1answer
407 views

How do I create a simple multigraph in tikz?

I am trying to use the package tikz to create a simple multigraph that should look like this (done in MS Paint): I wrote a code using the package tikz to make something very similar. Here it is: ...
3
votes
1answer
129 views

“Dimension too large” when using newcommand

When trying to use a newcommand with tikz I get multiple errors (all related to the same issue though) that show the message "Dimension too large". I don't understand why is that, the code seems fine ...
0
votes
0answers
624 views

Latex: Create tree diagram from text file [closed]

I want to create a TIKZPICTURE using some data output from SAS. The following code creates a simple tree with a few nodes. I can't continue to add the values by hand as the actual tree I'm using has ...
2
votes
1answer
313 views

change the angle of an edge of an automaton

I want to draw a transducer (automaton) that has the following characteristic. In every final state some edges leave those states with a letter label and don't go to any node. But i want to be able to ...
2
votes
1answer
108 views

different coordinate frames for anchors and backgroundpath in node shapes?

I want to create a triangle shape for flow diagrams, so far I succeeded but the anchors I have defined are badly placed. This seems to be wired as I have just copied and pasted the code from the ...
6
votes
1answer
1k views

TikZ to PDF from the command line

I am generating TikZ files using figures from MATLAB (using a MATLAB function from the stack exchange). I then open these files using TikzEdt, and generate the PDF file. Is there a way to make it ...
4
votes
1answer
322 views

How to annotate this chemical scheme using chemfig package?

To depict a chemical scheme with more than one reactant and more than one product, I used the handy package chemfig. I found some issues though annotating the below chemical reaction in a better way. ...
3
votes
1answer
361 views

tick mark separation

My graphs have two ticks on the x-axis. I'd like to have 3 graphs across a page and include y-axis labels. Right now that wont fit. Is it possible to move the x-tick marks closer together so the ...
4
votes
1answer
299 views

How to draw a bar (a filled rectangle of a very small height, just like a node of shape “line”)?

My current picture of a Petri net is The problem: the 'bars' (in grey) are too tall, although minimum height=0.1mm (seems doesn't have any effect). Is it possible to make these grey rectangles even ...
1
vote
2answers
502 views

Depth-first traversal of a binary tree

How can I achieve the drawing of a depth-first traversal of a binary tree like in this picture ?
6
votes
1answer
747 views

How to draw/annotate with TikZ on molecules drawn with chemfig package?

I have just discovered the TikZ spin-off chemfig package for chemistry drawings. I just wanted to add some transparent box to highlight a certain region of the drawn molecule with some text using ...
6
votes
2answers
440 views

Annotate grouped bar plot

I'm trying to draw a grouped bar plot, but with added dots "on top" to signify outliers in the results. Currently I have: \begin{figure}[] \begin{tikzpicture} \begin{axis}[ ...
11
votes
1answer
317 views

TikZ intersections and opacity

I am trying to recreate this image right here to practice myself in TikZ (I am new): What I have right now is this: The problems I have is that I want the bottom arc to extend just until it hits ...
21
votes
1answer
616 views

Drawing Bruhat--Tits trees with TikZ

I am not a regular user of TikZ, and I was wondering if there was a quick way of drawing trees that look like ? (the picture seems to have been taken from page 71 of J. P. Serre's book on trees). ...
8
votes
2answers
547 views

Drawing a square with colored hatched little subsquares

I would like to draw a as shown below. It is a square grid. Some regions are hatched in blue, others contain a red cross. Some edges are blue, others are red, but the red color don't reach the ...
7
votes
1answer
144 views

Use brackets in a \def macro doesn't work

I am using TikZ to draw some graph drawings (with nodes and directed edges/paths). I have two nodes and an arrow pointing from one node to another. I have made a macro called \pathedge so I can use ...
1
vote
1answer
532 views

Can I calculate a square or square root to include as coordinates in a tikz picture?

I am trying to draw the folding lines of a paper plane. This as a template for my kids to learn how to fold a paper plane. I came as far as: % based on ...
3
votes
2answers
687 views

Reusing circuit code with nodes in TikZ

I'm new to TikZ/PGF (a week or so in), and am loving it. I've had good success making figures so far, but have a question about best practices for including multiple copies of a sub-circuit in a ...
3
votes
1answer
108 views

Why does `align` break `tikz` node placement?

I want to put some marks in the document and place desciptions of these marks in the margin area, one below another. It works fine, however if I place a mark inside align environment corresponding ...
5
votes
1answer
310 views

Add background pattern to tikzpicture vertical bars

How do I replace the blue backgrounds as indicated in the picture with a diagonal and grid pattern respectively? I currently can't find a neat solution for my kind of graph. Code ...
3
votes
1answer
115 views

Inclusion of pgfplotstable in tikzpicture

Is there any way to include a table generated by pgfplotstable in the tikzpicture environment, where other figures generated by pgfplots exist, in order to save them together as one figure with ...
5
votes
1answer
3k views

FlowChart with TikZ

I'm trying to build a flowchart using the tikz environment but I'm having some trouble connecting the "No" line from decision to int (and from update to int). How can i draw a line avoiding ...
5
votes
1answer
210 views

Drawing transitive diagram in Tikz

I am very new to Tikz. How to draw rounded arrows and nodes without rectangular boundary. I want to draw something like this:
7
votes
2answers
1k views

Increasing precision in \pgfmathsetmacro

I would like to use \pgfmathprintnumber[/pgf/number format/frac]{\var} where \var is a variable set by \pgfmathsetmacro and I'm having similar difficulties as in this and this question. I'm aware ...
5
votes
1answer
228 views

Coons patches in pgfplots

The current method of drawing Coons patches in pgfplots requires four cubic Bézier curves along with point meta values for each corner point. This closely follows the format used in the PDF ...
5
votes
1answer
788 views

TikZ ER diagrams: really can't underline keys?

I'm creating an ER diagram with the TikZ ER library. The manual warns that although key attributes are conventionally underlined, it is hard to implement in TeX and the library uses italics instead. ...
1
vote
1answer
104 views

How to prevent a series of tikz nodes from overlapping?

I have the following MWE for the note command I'm working on. \documentclass{article} \usepackage[a5paper,marginparwidth=15mm]{geometry} \usepackage{tikzpagenodes} \usetikzlibrary{calc} ...
4
votes
1answer
705 views

TikZ - move calculated point to origin

i am trying to draw a point relative to a rectangle and than shift the whole rectangle so that this point is aligned with another point. \documentclass{standalone} \usepackage{tikz} ...
3
votes
2answers
167 views

TikZ-PGF child nodes in different locations

When I use TiKz to draw two trees, each in a nested picture, the position of the middle child of the second tree is different from the first. This is even though the code for the trees is basically ...
9
votes
2answers
8k views

How to draw Bar & Pie Chart

I'm want to include two graphs mentioned below in a document. I'm able to draw pie charts using pgf-pie. Is there any package which is capable of generating BAR & PIE Chart both? [Also which ...
4
votes
2answers
453 views

Problem with titlesec/titletoc/tikz

I have a problem in the sheet dedicated to the table of contents. I'm using titlesec/titletoc/tikz which works fine except in the page "table of contents". I have this result : The problem is that ...
5
votes
1answer
529 views

knitr and font style consistency in graphics

I am starting to use knitr to print graphics from R in my document. So far what I have been doing (I don't know if this is the best approach, but it is working) is to load the my R workspace with ...
5
votes
1answer
276 views

An overview of node positioning?

I've been making tikz pictures for a while now, and there seem to be a number of different ways to position nodes within a diagram. Absolute coordinates, east/west, left/right, the $ $ things, minimum ...
8
votes
1answer
186 views

Difficulty placing a dynamic fill command within a “\path let …” TikZ structure

I wanted to create a sequence of images that show a rhombus being folded. I'm able to do what I want, but the code is not very elegant. I wind up (needlessly?) repeating chunks of code to get the ...
5
votes
2answers
1k views

Text alignment using fix anchor positions in TikZ

I created some biological drawings using Dia and exported them as TikZ TeX code. I want to define some commands that insert these drawings and add some text to them. As there is a lot of text and ...
3
votes
0answers
47 views

Pgfplots bar chart - One plot, different colors [duplicate]

Is there a possibility to color bars of one plot in different colors? \begin{tikzpicture} \begin{axis}[ xbar, xmin=0, width=12cm, height=3.5cm, enlarge y limits=0.5, xlabel={\#participants}, ...
12
votes
1answer
8k views

How to fix the node size in TikZ?

I am simply looking for a way to fix the size of my node (block) regardless of the text inside. I find several posts similar, but not the same. All the solutions given make use of minimum width=0.1cm ...
2
votes
1answer
344 views

Error trying to compile tikzpicture code

Some of my tikzpicture code won't compile anymore. The following code used to compile (2 years ago), but now I get "ABD: EveryShipout initializing macros ! Package pgf Error: No shape named B is ...
4
votes
2answers
175 views

One big box contains three parallelly placed small boxes?

I am trying to make the three small boxes inside a big box with tikz. The three small backs are placed side by side at the bottom of the bog box. What I have tried so far is: ...
6
votes
1answer
614 views

pgfplots intersection with path

I am trying to find the intersections of a path with plots from pgfplots via the intersection library. The intersections found clearly do not match the visable intersections. It seems as if they are ...
1
vote
0answers
172 views

Scaling arrows in TikZ [closed]

I followed the link to sourceforge.net from Is it possible to change the size of an arrowhead in TikZ/PGF?. The last comment by left by Till Tantau led me to believe that I could implement code where ...
6
votes
1answer
412 views

\Mapsto in tikz-cd

I'm loving using tikz-cd to draw compiler correctness diagrams, but I can't manage to get quite the same arrows for relations that I'm using in the text. In particular, I'm not sure how to get \Mapsto ...
3
votes
0answers
113 views

Scalable node shape size [duplicate]

I can adjust the shape of nodes using commands such as minimum width or inner xsep, but these require explicit units. When I scale the entire figure (\begin{tikzpicture} [scale=0.5]) it does not scale ...
2
votes
1answer
389 views

tikzpictures positioning

I am having trouble trying to position tikzpictures in their correct position... I want to place the 3 plots with the green filling in a single line above (with the alpha/2 right below), and the 3 ...
1
vote
0answers
70 views

Trim/Clip scope by a defined curve [closed]

Hy I have to plot a vector field inside region in tikz. The arrows of the vector field should not appear outside the region. The region is the interior of : \draw [black, fill=white] plot [smooth ...
7
votes
1answer
246 views

Change filling of TikZ nodes in repeated picture

A diagram drawn with TikZ is used a couple of times and I defined a command for it. In the first picture I want to mark a subset of the nodes by filling them with light gray, and another subset of ...
8
votes
3answers
317 views

box the size of A containing B

A thing I'd often like to do is put in my document a box the size of some text A and containing some other text B. For instance, I have two tikz nodes, one containing $n$ and one containing $n+1$, and ...
7
votes
1answer
291 views

Breaks in tikzpicture graph

I have a graph drawn using tikzpicture and even though I've increased the resolution there are still gaps in the graph itself. \documentclass{article} \usepackage{tikz} \begin{document} ...