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)

0
votes
2answers
72 views

Creating a diagram in LaTeX, possibly with TikZ?

I am interested in drawing some flow style diagram with arrows, as sketched in the picture to represent the flow of recursion. I was hoping someone could point me in the right direction as to how I ...
1
vote
2answers
77 views

drawing convex envelope of a function

I am writing an introductory chapter to my thesis report. I want to add a figure that illustrates the convex envelope of a function no matter what function, though, it has to be continuous. I'm not ...
5
votes
3answers
786 views

How to draw the cards of a deck?

How to draw the cards from a deck using a Latex package, as TikZ?
5
votes
2answers
156 views

drawing smooth path through symmetric points, gives non symmetric curve

I want to make a graphic going through some points. I've choose the points symmetric, to have a symmetric curve, but the curve is not. I could define some extra points, but their must be a better ...
1
vote
1answer
22 views

How can I label inputs to a logic gate using Circuitikz?

Is there any way, or how would I go about adding labels and straight line inputs to logic circuit diagram? The code I have now is as follows: \documentclass[11pt]{article} \usepackage{circuitikz} ...
3
votes
0answers
26 views

Where can I find a complete list of the standard subgraphs offered by tikz?

One can use subgraph I_nm and subgraph C_n, is there a complete list? In particular I'm looking for a linear subgraph, but a complete list would be extremely helpful. I just found this in the ...
7
votes
1answer
57 views

PDF for the hypergeometric distribution

I wish to plot the p.d.f. for the hypergeometric distribution, and I have been using lua combined with pgfplots. However I get an error when I use the density function with the formula for the ...
3
votes
1answer
88 views

Figure not centered properly in LaTeX, kindly help!

I am making a figure in LaTeX of which the code is given below. In the end result, the figure is not centered in the page, the page offset from the left is more than the page offset from the right. ...
4
votes
1answer
53 views

Problem with a Lua function in a \foreach loop

I have written a Lua function to position dates in a timeline that I am drawing with TikZ. The function seems to work, but when I use it in a \foreach loop I get the following error: ! LuaTeX error ...
2
votes
0answers
34 views

Set tikz font type like text

I have the problem that my labels from lines as from the axis are in a different font as my text. How can I set the tikz font to a similar one as the text? I have the following example: ...
5
votes
2answers
117 views

Petersen graph with new tikz graph library

I'm considering moving from tkz-berge to the new tikz graph library for drawing my graphs (in the sense of graph theory). I have produced the Petersen graph, but is there is a more elegant way of ...
4
votes
1answer
69 views

TikZ node label distance depends on length when using tikzstyle

When I include circle in the every node style, the distance from the label to the node depends on the length of the label: \documentclass{standalone} \usepackage{tikz} \begin{document} ...
6
votes
4answers
201 views

Tikzpicture e-function

I have the problem that i get an error message (dimension too large) when i try to draw an e-function: \documentclass[BCOR=3mm,11pt,headsepline,footsepline]{scrbook} \usepackage[ngerman]{babel} ...
1
vote
2answers
125 views

How can I create good looking integral paths?

I'd be really grateful if someone could inform me of a method to replicate the attached diagram for inclusion in LaTeX.
6
votes
1answer
50 views

How to make only one part of double bond bold with chemfig?

I'm trying to get this kind of appearance for chemical structure (see highlighted regions): By so far I could manage to do like this: This is my code: \documentclass[12pt]{standalone} ...
9
votes
2answers
206 views

\foreach with \newcommand how to use them together?

What I want to do is to shorten this \newcommand with a \foreach since this is just a very little part of what I will use. \newcommand{\CC}{{\mathbb C}} % the set of complex numbers ...
5
votes
1answer
95 views

TikZ picture beside text with nested enumerate environments

I have a block of text which contains nested enumerate environments and I'd like to place a TikZ picture to the right of that text in such a way that the text does not overrun the picture. I tried ...
2
votes
7answers
435 views

Draw a quiver diagram with TikZ

I would like to know how to draw a quiver diagram like this one. I know there exists TikZ or something like that, but I don't know the commands or packages necessary to draw it.
2
votes
0answers
49 views

My Markov-Chain Graph is not shown in the right place

This is my Graph: \begin{figure}[htb] \centering \tikzsetnextfilename{kalman} \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node ...
3
votes
2answers
102 views

Using Tikz to position a background image in mini page

I'd like to use tikz to position a graphic at the lower right hand corner of a minipage. I've gotten this far (this isn't quite an MWE, since it depends on a locally available imagefile). ...
7
votes
1answer
93 views

How can I wrap equations around a TikZ picture?

I am trying to arrange the image to be on the left of the equations, and I'd be grateful if someone could point me in the right direction. I have tried wrapfig, but I really couldn't manage to ...
3
votes
2answers
47 views

How to enable minor y ticks for a logarithmic axis

I am using pgfplots to create some plot with logarithmic axis. But Latex automatically shows minor y ticks for some of them and doesn't show them for the others. Here is an example (when I increase ...
0
votes
2answers
71 views

Hypersphere inscribed within hypercube

Let's consider a hypersphere of radius r inscribed in a hypercube with sides of length 2r. Than take the ratio of the volume of the hypersphere of radius r to the hypercube with side length l = 2r. We ...
5
votes
2answers
71 views

TikZ: How to change the width of background layer?

As shown on the picture below, the TikZ backgruound library allows to create the background with automatical width/height settings. \usetikzlibrary{backgrounds} \begin{tikzpicture} [show background ...
1
vote
0answers
46 views

distances before and after tikzpicture

I have the problem that before and after a tikzpicture plot the distance is much higher than it should be \documentclass[BCOR=3mm,11pt,headsepline,footsepline]{scrbook} \usepackage[ngerman]{babel} ...
6
votes
1answer
83 views

Fail to translate a polar point by a vector

My objective is to draw the following trivial diagram (just for an illustration purpose). \documentclass[tikz,border=12pt]{standalone} \begin{document} \begin{tikzpicture} \draw (-2,0) circle ...
3
votes
1answer
68 views

Decorating drawn arrows in tikz

I'm trying to define a custom command which is to be an arrow with a tilde (\sim) on top of it. So far I have \newcommand{\tosim}{\mathrel{% \tikz[baseline,label/.style={% postaction={% ...
3
votes
1answer
104 views

Pythagoras' Triangle

I would like to draw a triangle using Latex which represents length 1 along the horizontal axis, $\tan{\theta}$ along the vertical axis and $\sqrt{1+ \tan^2(\theta)}$ along the hypotenuse, with angle ...
2
votes
1answer
60 views

How to recover this Tikz drawing that no longer compiles

Over a year ago I created a graphic in TikZ and made it public on wikicomon wikicomomns. I posted also the code to create the graphic. Since then I changed computer and when I tried to use the code I ...
3
votes
1answer
56 views

How to move a set of nodes without modifying each coordinates?

The following is a trivial example to illustrate my problem. \documentclass[tikz,border=12pt,12pt]{standalone} \begin{document} \begin{tikzpicture} \draw (0,4) -- (5,4); ...
3
votes
1answer
44 views

TikZ3 arrow tip specification for “no arrow” or “shift tip” option

A specification like this arrows={|>[sep=10pt]-} works perfectly giving something like |-->--------. I would like to use the sep option to shift the arrow in the same way but without the ...
3
votes
1answer
53 views

Why the background of a pgf fitting node with minimum width equal to another (backgrounded) fitting node's width is shifted?

I have two pgf fitting nodes: one below the other, left aligned, with different (unpredictable) widths, and I'd like them be backgrounded, with backgrounds of the same width. For this, I got help ...
3
votes
2answers
49 views

Aligning forest trees and getting the bounding box right

I want to set the following figure: I managed to recreate it using forest, but for reasons I do not understand, my command \menge, which I use for sets things that the forest trees are much larger ...
0
votes
0answers
21 views

Move tikzpicture on a beamer slide [duplicate]

I'm trying to move a tikzpicture on a beamer slide. This picture is centered, but I want to move it around on the slide without manipulating the tikz code. Do you have any idea? This is a minimal ...
3
votes
3answers
153 views

Drawing two edges, one is missing an arrowhead

I'm trying to define two parallel arrows as a custom command in my preample as follows: \newcommand{\toto}{\mathrel{% \tikz[baseline] \draw[->] (0ex,.96ex) -- (3ex,.96ex) (0ex,.16ex) -- ...
3
votes
1answer
79 views

TikZ&Titlesec: complicated part design

I am trying to do the design as shown on the picture below. The background includes two layers: vertcal line pattern and gradient layer where is lower color is transperent and upper color is white ...
4
votes
1answer
90 views

Convert tikz to \includegraphics

I have a paper that I wrote with a lot of figures generated with tikz, but I've been asked to supply a version that doesn't use any "nonstandard tricks", i.e. with the images included with ...
3
votes
1answer
151 views

PGF stacked bar graph not drawn correctly

I am having problem with the following code which is supposed to produce a simple stacked graph. \documentclass[tikz,border=2pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \begin{document} ...
3
votes
0answers
33 views

\addplot table with input filename relative

I include plots using matlab2tikz to generate tikz-files. There was a nice feature added which enables external datasets. A file plot.tikz is generated with the following code (unnecessary code is ...
5
votes
1answer
71 views

TiKZ pattern on an angle?

I would like a result similar to that provided by pattern = sixpointed stars (or fivepointed; doesn't matter), but where the underlying grid is at an angle. I understand this can't be done with the ...
3
votes
1answer
63 views

Getting colored open circles to indicate the absense of a number in the domain of a function

The following code instructs TikZ to plot a function and its derivative. There are two modifications that I would like. Since the function is not differentiable at 0, I would like to have open ...
2
votes
1answer
74 views

How to conditionally draw nodes of a tree in TikZ

I want to draw several trees with tikZ (Version 2.10) which are very similar in the sense that there is a first tree and the others are obtained by ommiting some of the nodes of the first one. I ...
2
votes
1answer
64 views

HowTo: 3D plot of a surface element with normal vector

I'm new to tikz, and I'm trying to visualize a surface element, something like In contrast to the example image above (which I referenced from the web), I would like to draw the surface element in ...
5
votes
2answers
47 views

Autogenerate aliases based on scope

I want to be able to refer to nodes inside a scope from outside the scope by specifying their scope and name as in TiKZ node name prefixes in scopes The solution proposed there renames the nodes so ...
7
votes
2answers
224 views

TiKZ node name prefixes in scopes

I am using TiKZ to draw two copies of the same graph above each other, and now I want to add edges between a vertex in one copy and a vertex in the other copy. It suddenly occurred to me that it would ...
5
votes
1answer
28 views

How are pic text and options supposed to be used?

I'm trying to use pic text but it has no effect on my code. This is a Minimal Example: \documentclass{article} \usepackage{tikz} \tikzset{seagull/.pic={\draw (-3mm,0) to [bend left] (0,0) to [bend ...
3
votes
0answers
24 views

Connecting two nodes from different forest trees [duplicate]

I want to draw the following figure without pstricks: What I have is the following code: \documentclass{minimal} \usepackage{forest} \usepackage[external]{adjustbox} ...
1
vote
0answers
54 views

Tikz - dynamic letter

I've got the task, to create a pattern for a letter or something else. It must have a perspective view like in this example So I think I've just managed to create something that looks nearly ...
26
votes
2answers
2k views

Milestone graphic in TikZ

This question led to a new project for a TikZ based solution: timeline The author of the original artwork has posted his METAPOST based library: blueprint How could I implement a ...
2
votes
3answers
80 views

Aligning subfigures in a 2x3 grid with tikz

I have a number of plots obtained with matlab2tikz. Now I want to align these plot in a neat way. I used the subfigure package, but the result is not aligned very nice, see My latex code is: ...