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)

3
votes
1answer
72 views

End of proof symbol in tikz environment

I have a (tikz) diagram (a matrix of math modes) at the end of a proof and would like to place the end of proof symbol on the height of the last line of the diagram. I tried to place \qedhere in the ...
1
vote
0answers
17 views

How do get Tikz arrows.meta working with Ubuntu and TexLive

The Tikz arrows.meta package does not work on my Ubuntu 14.04 installation. When I attempt to compile a Latex file with \usetikzlibrary{arrows.meta} I get the error ! I can't find file ...
4
votes
1answer
26 views

How can we set the parbox width to fractional multiple of horizontal unit of tikzpicture?

In the following code, I set the horizontal unit of tikzpicture to 1/20 of the width of an image. I also want to use \parbox with a fractional multiple of this unit as its width. ...
6
votes
1answer
63 views

Make “axis cs” the default coordinate system in a PGFPlots plot

I would like to know if there is a way to specify axis cs to be the default coordinate system inside a plot in PGFPlots, so I don't have to type axis cs: in front of every coordinate pair. Here's a ...
2
votes
1answer
45 views

Overlapping labels in tikz barplot

I have a problem with the placement and size of nodes in my barplot. I changed the size in the code from \small to \tiny: every node near coord/.append style={font=\tiny} but, the numbers are still ...
4
votes
3answers
114 views

Expansion Issues When Passing TikZ Styles to Macro Created by Macro

I'm struggling (again) with expansions. This time I have a generic function \misdirection that creates a TikZ environment subject to a few options. Then, I create a macro \freezeStyle that creates a ...
3
votes
1answer
100 views

Sigmoid membership functions with tikz

I would like to draw fuzzy membership functions using tikz. The problem has already been solved in Trapezoidal solution for trapezoidal MF, but I need something similar for sigmoidally shaped ...
3
votes
1answer
37 views

tikz Controlling the position of prongs of underbrackets in an equation

I would like to make a two (or more) pronged underbracket (or overbracket). In particular, I would like to control the: number of prongs. position of the prongs by specifying to which characters in ...
0
votes
0answers
38 views

Drawing 2nd background layer in tikz

The code below is the code for a figure I stole from http://www.texample.net/tikz/examples/labs-schema/. I am attempting to modify it heavily by stripping down most of the nodes and installing an ...
2
votes
2answers
24 views

tikz matrix undefined control sequence

I would like to use tkiz matrix but any compilation within a tikz picture ends with error: ! Undefined control sequence. <argument> \pgf@matrix@last@nextcell@options I wonder if there is no ...
3
votes
2answers
97 views

Making TikZ do certain calculations

I want to draw a picture illustrating how a vector field that is invariant under rotation around a point need not be radial in 2D, but does need to be radial in 3D. This question will concentrate on ...
4
votes
1answer
57 views

Tikz/pgf half-arrow stroke always down/left

I want to draw so-called bond graphs with TikZ, where elements (nodes) are connected through half-arrows. I can use a "left/right to" arrow head, use the 3.0 \draw[-{Straight Barb[left]}] (a) -- (b), ...
0
votes
0answers
61 views

How to make this specific block in XeLaTeX

I want to do these "cards" using XeLaTeX. Concerning the above card, I would like to remove the heart, arrow, and action buttons. In other words, I would like to remove the action area 2. Also I ...
0
votes
0answers
16 views

Problems with Babel, TikZ, dot2texi, and Hebrew

I've been trying to run pdflatex (with the -shell-escape flag of course) on the following code but got an error: ! Bad space factor (0). \@savsf \documentclass[english, hebrew]{article} ...
2
votes
1answer
53 views

Filling regions created by plot[smooth] with color

I would like to color each region of the picture by some color. Tikz code: \begin{tikzpicture} \node[draw=none] at (3.5,3) {\scriptsize \ldots}; \node[draw=none] at (0.42,1.47) [text width=1cm] ...
2
votes
3answers
395 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 ...
4
votes
1answer
68 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 ...
1
vote
1answer
33 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} ...
6
votes
2answers
239 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
2answers
98 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 ...
4
votes
1answer
58 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
47 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: ...
7
votes
1answer
70 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 ...
4
votes
1answer
81 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} ...
11
votes
2answers
252 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 ...
3
votes
1answer
93 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. ...
6
votes
4answers
232 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} ...
5
votes
2answers
129 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 ...
6
votes
1answer
55 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} ...
2
votes
0answers
51 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 ...
4
votes
3answers
853 views

How to draw the cards of a deck?

How to draw the cards from a deck using a Latex package, as TikZ?
3
votes
2answers
107 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
96 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
52 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
79 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
77 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 ...
6
votes
1answer
84 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 ...
1
vote
0answers
47 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} ...
3
votes
1answer
72 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
105 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 ...
3
votes
1answer
45 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 ...
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
2answers
50 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 ...
4
votes
1answer
93 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
0answers
37 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 ...
2
votes
1answer
64 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 ...
2
votes
7answers
448 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.
3
votes
1answer
54 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
1answer
58 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
67 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 ...