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
2k views

Drawing parallelogram with fixed angle, width and height?

I want to draw parallelograms with fixed angle, width and height, but it seems that trapezium in PGF/TikZ cannot specific the height without changing angles. \documentclass[tikz]{standalone} ...
4
votes
1answer
135 views

Fixing ordering of nodes and color (TikZ)

This is my first time using TikZ. I can't figure out how to change the ordering of the nodes from bottom up starting from the bottom left corner? Also, when I try to use package xcolor midnightblue ...
3
votes
1answer
685 views

Bringing the nodes of a TikZ decision tree closer to each other vertically

I am currently working on creating a decision tree for a journal publication and need to save space. As of right now, my decision tree looks like Although this is nice, I would like to "compress" ...
9
votes
1answer
362 views

Custom, space-saving ellipse as TikZ node shape?

in some applications, one wants to use ellipses as node shapes in figures, e.g., when in the literature on a subject typically uses ellipses to denote certain things in figures. The problems with ...
2
votes
1answer
80 views

Custom symbol on top of a variable which automatically gets scaled?

I want a custom symbol on top of a variable. The problem is that the symbol size always keeps the same if the variable size is changed. In a more sophisticated formula with fractions etc. that looks ...
4
votes
2answers
240 views

Graphical vertical rule in tikz

I would like to make design (class), where I would like to have special type of paragraph that will have { character on left and will have height exactly same as height of whole paragraph. Also, I ...
3
votes
1answer
208 views

Table and \tikzexternalize

It might not be a usual thing to do but I need to put some tikz pictures in a Table with externalization. I did \documentclass{report} \usepackage{tabu} \usepackage{tikz} \usetikzlibrary{external} ...
4
votes
1answer
418 views

Drawing on multiple images inside the same tikzpicture, how to get the right transformation of coordinates?

Following Drawing on an image with TikZ, I've had many succesful instances of drawing on a picture with TikZ. However, now I have a tikzpicture environment with several graphics, and I want to draw ...
5
votes
2answers
595 views

Align environment inside TikZ

I'm new to TikZ, and I'm trying to use the align enviroment to align some text then draw something on it using some TikZ lines. But the problem that pdfLaTeX is generating an error whenever I try to ...
7
votes
1answer
375 views

Typesetting straight baselines in a circular arrangement

I was wondering how one might go about setting the circular arrangement seen here in Figure "(2)"--i.e.,in a series of straight lines radiating from a central point. The most useful thing I've ...
3
votes
2answers
267 views

Optimizing a piece of TikZ code (involving rotation of ellipses)

I have the following piece of TikZ code and I was wondering if it can be optimized? (I am actually sure that it can be!) The main issue is this: When I rotate the first batch of nodes surrounded by ...
22
votes
3answers
6k views

How can I set the TikZ label anchor explicitly?

I want to add a label to a node, but "inside" the node. Something like this: The manual seems to indicate it might be possible, although no actual key is named. The ... anchor point for the ...
2
votes
2answers
369 views

How to position qtrees

Suppose, I have 2 qtrees, that I want to put below each other: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree,tikz-qtree-compat} \usetikzlibrary{positioning} \begin{document} ...
2
votes
0answers
184 views

Stacked bargraph nodes near coords too bunched up vertically tikz [duplicate]

How do I center the coordinates in their bars vertically? This shows horizontally in ybar \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
16
votes
2answers
10k views

Increase the thickness of node border in TikZ

Suppose I have a node in the shape of a circle. How can I make its border thicker? \node[circle, draw=blue!80, inner sep=0pt, minimum size=12pt] (1) at (0,0) {1};
4
votes
1answer
350 views

Beamer and \foreach operator

This is my first figure trying to have it in the beamer with \foreach. For some of you may be it is work five minutes ... but for me it has consumed the whole morning ... So my question: How can I ...
2
votes
1answer
466 views

Change axis number format for external tikz file

I'm using \input{filename.tikz} to include .tikz graphs created by matlab2tikz in my LaTeX document. As shown in a comment on this question it is possible to change the plot marker size when the ...
13
votes
1answer
312 views

how to draw a chain of gears

I'd like to draw a chain of gears, like this: I'm using the macro provided by Alain Matthes in Creating gears in TikZ for drawing a single gear with some modification to obtain the "double gear" ...
3
votes
1answer
142 views

Node placement problem

This is my first question in tex.stackexchange. It might be relatively simple problem but I am having difficulties with the placement of the nodes inside graphics. The problem is that when I try to ...
4
votes
1answer
404 views

Grid lines in top-view surface plot

I'm almost satisfied with my graphs, only grid lines are missing. What I'm basically doing is a sort of density plot / color plot by letting pgfplots generate a surface and viewing it from the top: ...
4
votes
2answers
139 views

How to set the width of \cancel

I have 2 TikZ nodes with fixed text width: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{cancel} \begin{document} \begin{tikzpicture} \node[text width = 3cm] ...
8
votes
2answers
184 views

How to make this pgfkeys code more compact and streamlined?

I have just managed to create my first command with pgfkeys. I defined a command \myset, whose purpose is to make (for example) \myset[big]{abc} correspond to \bigl\{abc\bigr\} Part of my goal ...
3
votes
1answer
154 views

How do I nest subdrawings in a bigger drawing in TikZ?

I want to draw several complex drawings and put them all together in a bigger TikZ drawing. How do I do that? So far, this is what I have done: \documentclass[preview]{standalone} \begin{document} ...
6
votes
1answer
590 views

Making bold tick labels in tikz

How do I make the tick labels bold? Here's a minimal example: \documentclass[tikz,convert]{standalone} \usetikzlibrary{datavisualization} \begin{document} \begin{tikzpicture}   ...
2
votes
1answer
61 views

avoid line clipping in path picture

I define a node style Host like this (sorry for german labels): \tikzset{Host/.style={path picture={% \coordinate (hinten links oben) at ($(path picture bounding box.north west)!0.33!(path picture ...
9
votes
1answer
495 views

Filling the arrow tip and not the path using two different colors

I have a small problem with some arrows but I can't seem to find a solution. Please note that this question is different from Setting fill color for TikZ arrow tips only (and not the path itself), ...
5
votes
2answers
198 views

Is It Possible to Combine TikZ Distance and Line-To Operations?

Using LaTeX and TikZ, is it possible to use a Line-To operation in the same command as a distance operation? I would like to draw a rectangle and then create a named node at the midpoint of the upper ...
5
votes
1answer
392 views

Scale markers in external Tikz file

I use external .tikz files to include graphics in my LaTeX document. These .tikz files are generated by matlab2tikz. The scatter plots that come out though have very small markers. I want to scale ...
8
votes
3answers
472 views

Minipage footnote is inside tikZ node

I have a minipage, and inside of it I have a footnote and a tikZ picture. Now my problem is, that the footnote text goes inside the last node of my tikZ picture. That is not what I want – and it's ...
4
votes
1answer
249 views

Use arbitrary amount of underlines + descriptions using TikZ on parts of words

This is an extension of this question. In linguistics, word analyses are often necessary and I think that TikZ is an excellent tool to bring some life, color, and most of all clarity to the scene. I ...
0
votes
0answers
34 views

How to put text on top some image in tikz? [duplicate]

I have an image like this: Is there a way to put text on top of this image? I want some text like this:
3
votes
1answer
225 views

How can I underline multiple parts of the same word using braces with TikZ?

UPDATE: I opened a related question here. I work in the field of linguistics and I sometimes need to analyze prefixes, affixes, and suffixes in words. It would be nice to be able to add notes to ...
7
votes
1answer
5k views

How to draw THICK arrows (shown below in the figure) in tikz?

I want to draw something like this: I am not able to draw this. This is what I have drawn: This is the code: \documentclass[a4paper,10pt]{article} %\documentclass[a4paper,10pt]{scrartcl} ...
2
votes
2answers
660 views

Rotating around axes with tikz-3dplot

I'm a bit confused by the following code. I would think that the following would produce an animation of rotating 90-degrees around the x-, y-, and z-axes, but the first part of the animation looks ...
7
votes
1answer
3k views

Tikz: Text along top and bottom of arrow path

How can I add text to both the top and bottom of a path? My commutative diagram below is 90% complete. I would, however, like text={${gKer({\varphi}){\mapsto}{\varphi(G)}}$} following the path below ...
1
vote
0answers
33 views

Latex: conflict titlesec and tikz packages [duplicate]

I am using the IEEEtran class and I also call in my preamble the titlesec and tikz packages. If tikz is not called my code runs fine. Otherwise, (when calling the tikz package) I am given this error ...
2
votes
1answer
350 views

How to automatically scale inline TikZ code in subscripts?

I want to use inline TikZ code to create my own subscript symbol. For example something like $V_{\tikz{ \draw [|->] (0,0) -- (2ex,0); }}$ The problem is that it is not scaled. The length of the ...
9
votes
1answer
729 views

Creating fancy section pages for Beamer

I am currently struggling to create fancy-looking section pages in Beamer to achieve the following layout: Based on my question on the matching TOC (fancy-table-of-contents-for-beamer) I came up ...
3
votes
0answers
317 views

Scale TikZ nodes and shapes for a given canvas size

I have the following code to produce an hexagon coverage area: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \usetikzlibrary{positioning} \usetikzlibrary{calc} ...
3
votes
1answer
295 views

Wrong plot alignment when using colorbar and groupplot

The alignment of the plot is wrong when I use colorbar, see figure. How can I fix this? Further I would like to know how I can make the small axis ticks black in stead of gray? Now you can't really ...
2
votes
1answer
184 views

Can't use animations with \input?

I have two different animations, made with TikZ and the animate package, that I want to include in a beamer presentation. When I had the code inside of my presentation's .tex file everything worked ...
4
votes
1answer
214 views

A line parallel to an edge in a TikZ picture

I have a graph in TikZ built using code like the following \node[...] (1) at (0,0) {1}; \node[...] (2) at (1,1) {2} edge (1); I would like to add a short line (with an arrow) parallel to the ...
3
votes
3answers
242 views

How to draw an 3+1 decomposition in tikz

I am trying to draw the following picture in tikz but I can't make it. Any suggestions on how this can be done in TikZ or somewhere else?
15
votes
5answers
792 views

Draw a chain of beads

I would like to reproduce this kind of figure: I'm wondering what's the best way to achieve that with TikZ. My guess is to draw an element composed of a circle + a link and to link this element ...
6
votes
2answers
425 views

Controlling Matrix like a shape in Tikz

Would it be possible to control a matrix in Tikz as accurately as possible as with regular shapes? For example, inside a Tikzpicture, I could simply control a shape's size by writing ...
6
votes
1answer
228 views

Proper way to align labels with nodes tikz

Consider the following code: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (1,1); \coordinate (B) at (2,2); ...
6
votes
1answer
561 views

Strange error when combining Beamer, Animate, Tikz and Listings

I'm working on some slides where I show how code is actually executed in Java. Therefore I'm working with the animate package to generate animations. Without going into details, I've written a macro ...
3
votes
0answers
285 views

My tikzpicture is to large for my beamer frame [closed]

I'm extremely new to LaTeX and this is my first post on this site. I have a major presentation coming in a couple weeks, and I'm in great need of your help. I export Geogebra code for my graphs, it's ...
8
votes
2answers
920 views

tikzDevice is not getting sizes right (knitr)

I am using OSX, pdflatex, R (cran), tikz/tikzDevice and knitr to create my documents. My problem is that the font sizes of the produced tikZ-file do not match the LaTeX document font sizes. Result / ...
12
votes
3answers
3k views

Drawing a scattering Feynman diagram with TikZ

I am trying to produce a scattering diagram with TikZ but I have become stuck. The Desired Structure I am trying to achieve this layout of lines, including their arrow directions. In my diagram. ...