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
2answers
6k 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
622 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
1k 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": ...
8
votes
1answer
622 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 ...
2
votes
0answers
914 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: ...
40
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
591 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
1k 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
109 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
673 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
2k 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 ...
11
votes
1answer
2k 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
580 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
637 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
697 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
1k 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 ...
14
votes
3answers
1k 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, ...
7
votes
1answer
3k 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
177 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
567 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
371 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} ...
13
votes
1answer
921 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
2k 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
2k 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
1k 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
1k 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
876 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
179 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
346 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 ...
7
votes
1answer
3k 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
560 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 ...
29
votes
6answers
2k 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 ...
2
votes
1answer
593 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
816 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
766 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
179 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} ...
4
votes
1answer
943 views

Model Railway planning

As there are so many fancy things which are able to do with LaTeX, is there a possibility to create layouts for model railroads? I know only special (mostly Windows) programs, to do that, e.g. ...
2
votes
1answer
462 views

tikzpicture and pdf - x axis partially disappears

I would like to know why the x axis partially disappears, given the following code. Is it a PDF problem? Also, is there any option to connect the midpoints automatically but not in a smooth fashion? ...
7
votes
1answer
4k views

How to change xticklabel or yticklabel style to Percentage?

When using tikzpicture in the pgfplots package, how can I change use PERCENTAGE for xticklabel or yticklabel. Here is a simple example: \documentclass[a4paper]{article} \usepackage{pgfplots} ...
4
votes
2answers
4k views

Referencing TikZ matrix nodes and drawing

I'm struggling with a matrix where I want to put drawings into the cells, but would still like to reference the cells as it is possible with (text) nodes, e.g. for annotation. I know that I can ...
16
votes
5answers
11k views

TikZ editor for Mac OS

I'm looking for an editor like tikzedt for Mac OS X. Or something similar in order to write and see quickly the result. Any suggestion ?
7
votes
1answer
425 views

Transparency group and decoration markings

How can I set the transparency so that the arrow belongs to the same transparency group as the path? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} ...
2
votes
1answer
126 views

How to have 2 lines in a block?

I'm using the schemabloc package, and I want to have 2 lines of text in a bloc... Diode under Protection, and Oscillator under Boost in the following example Here it is: \documentclass{article} ...
5
votes
1answer
967 views

Preview TikZ figure in AUCTeX?

I am using AUCTeX on Emacs. Recently I began to draw pics using TikZ, but the problem is AUCTeX doesn't generate preview of this environment. (However, it does generate preview for the general figure ...
2
votes
0answers
26 views

How to refer to a relative position within a node? [duplicate]

I've included an external image in a TikZ diagram as follows: \node (A) {\includegraphics[width=4cm]{image.png}}; The image is 100x100 pixels, and I need to draw a path from pixel (64,32). Is there ...
4
votes
1answer
175 views

Options passed to a path inside insert path style

Is there a way to give to the \path (inside mypath style) the options given to the \draw and \fill commands (ideally, the path should be drawn and red then filled and blue) ? ...
15
votes
2answers
1k views

Intersection of 2 lines not really connected in TikZ

In the code below I repeat one line (one with opacity=0 and other without it) in order to draw the intersection of 2 lines that are not connected. I am seeking a better way to achieve the same result. ...
4
votes
1answer
777 views

How to increase numbers precision in TikZ histogram

I entered fixed point numbers in the following code: \begin{tikzpicture} \centering \begin{axis}[xbar,bar width=0.2cm,legend style={at={(0.5,-0.15)}, xmin=0,xmax=0.8,anchor=north,legend ...
5
votes
1answer
322 views

Creating borders within the specified margins

I've been trying to get borders for specific pages for my thesis, using tikz. Unfortunately, the borders exceed the margins specified, and since I have to submit a bound copy of the thesis, this is ...
16
votes
2answers
926 views

How to turn off an environment (e.g. tikzpicture) for faster draft compiling

I'm currently writing my thesis and have been looking for ways to speed up compile time. I can shave off a lot of time by using draft mode so that images aren't processed, but I have several TikZ ...