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
2answers
1k 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
464 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
305 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 ...
25
votes
3answers
12k 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
646 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
186 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} ...
35
votes
2answers
30k 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};
5
votes
1answer
554 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
771 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 ...
16
votes
1answer
655 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
151 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
652 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
213 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
194 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
176 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
894 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
78 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
837 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
252 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 ...
6
votes
1answer
775 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
722 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
318 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
39 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
322 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
9k 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
1k 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 ...
8
votes
1answer
5k 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
35 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 ...
3
votes
1answer
520 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
886 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 ...
6
votes
1answer
505 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
455 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
246 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
382 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
283 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
976 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
510 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
393 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); ...
7
votes
1answer
707 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
447 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 ...
6
votes
2answers
448 views

Wrapping a Feynman diagram in an ellipse or a circle?

I used a variation of the following code in order to create Feynman like diagram in latex using the answer in Drawing a scattering Feynman diagram with TikZ However, I want to wrap the diagram inside ...
8
votes
2answers
1k 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 / ...
15
votes
4answers
5k 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. ...
0
votes
1answer
539 views

Beamer overlays - how to make things appear in different places? [closed]

So I just started using beamer and got introduced to the \pause command. But I want things to show up at different places on the screen, not necessarily from top to bottom. How to do that? ...
6
votes
2answers
269 views

Saving a list in a re-usable box

Pardon me if this is a dumb question, but I am a bit rusty about this. I want to store a list like one generated by the enumerate environment in a re-usable box that I may re-use within a TikZ ...
8
votes
1answer
592 views

decoration nodes not being placed on the circle they are intended to be on

I "placed" some nodes on a circular path but they aren't showing up in the correct place and they aren't even on the circle. What is going wrong? \begin{document} \usepackage{tikz, pgfplots} ...
41
votes
3answers
1k views

Creating CAPTCHAs and other fancy distorted letters with TikZ

I try to do a little more spectacular that phrase ( Δελτιο Υλης) . Is the headline on a press material for my students. The fact is that I could accomplish this with gimp or a graphics program such as ...
6
votes
1answer
224 views

circle node on an ellipse

I want to put this node on an ellipse at about the 35% mark \node[draw, circle, inner sep = .08cm, scale = .75] (location) {2}; \documentclass{article} \begin{document} \usepackage{tikz} ...
12
votes
3answers
778 views

Fit only the height on a node

I've been trying to get the fit key in TikZ to scale a node so that it matches only the height of it's fit nodes but I haven't been successful. I'm trying to get the red box to be the size of the blue ...
5
votes
0answers
785 views

Making arrow heads smaller using “arrowsnew” [closed]

I want to make the arrowheads smaller on the $\delta v_A$ arrow and on the [<->] arrows. I made the file from this post Is it possible to change the size of an arrowhead in TikZ/PGF? but it ...