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)

8
votes
1answer
161 views

Is it possible to derive a new style from an existing style?

Is there a convention in TikZ for defining a new style as an extension of an existing style? As it stands, I can do: a/.style = { black, very thin } Then I could extend this style locally ...
7
votes
1answer
344 views

How do I evenly fill the background color of a block of elements inside a TikZ matrix?

When I fill each element separately of the blocks that I want to highlight, the PDF output shows very small white spaces in between the backgrounds of the separate matrix elements inside the ...
3
votes
1answer
205 views

Problems about drawing a map and learn to draw with TeX

I'm doing a beamer, and now I encounter a problem. I want to draw a map in my beamer like this Who can help me? I'm now still not very familiar with these things. Also I want to learn some basic ...
6
votes
2answers
1k views

Making Tikz automatic node placement work

I have found some tikz code that uses a development build (past 2.10) and I am trying to get it to work (I sense that I am doing something rather silly). For what is it worth, I confirmed that the ...
5
votes
0answers
202 views

Absolute path for pgf externalisation

The graphic externalisation works well when it is done in a subfolder of my TeX files with the command \tikzsetexternalprefix{figures/} However, I get an error message when I try to set a different ...
3
votes
1answer
206 views

Pgfplots label not appearing

\documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \begin{axis}[ticks=none, xtick={-10,-9,...,10}, ...
2
votes
1answer
130 views

How enlarge the two parts of data

below shows the graph and code. the red circle show two portion of data. since the upper red circle has data values >1500, therefore the lower red circle(0-500) shows all lines cramped together..is it ...
4
votes
1answer
188 views

Anchor point seems incorrect for Chemfig package

I'm trying to use chemfig to draw a basic schematic for enzymatic browning and have encountered a problem. In the bottom reaction (bottom right to bottom left) quinone is formed by the enzyme (denoted ...
13
votes
2answers
538 views

How to draw a small brace in tikz?

I'm trying to draw a small brace. For example the latex code is like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture} ...
4
votes
4answers
567 views

Recursive drawing, command flow

I am trying to recursively draw Ck x Ck, where Ck is the k-th iteration of a Cantor set. I have a command which recursively calls itself four times. If I pass N as parameter #6, the output ...
6
votes
1answer
3k views

Filling in markers in pgfplots

I've been searching around and digging through the pgfplots manual and I can't quite seem to find a good answer for this. I'm trying to make a graph with "open circles" to indicate where the function ...
4
votes
1answer
358 views

How to draw search space tree in a dynamic manner

I am visualising the search space for a set of binary variables. I have done it for three variables before; and now I am extending it to six but seems a tedious work to do. Thus, I am wondering if ...
3
votes
1answer
480 views

Two boxplots per plot entry - shifting boxplots in pgfplots

I'm trying to compare the results of a control group and an experimental group under different conditions. To simplify, let's assume there is only one condition (ie. only one mark along the x axis ...
7
votes
2answers
637 views

Two-sided bar chart

I strive to make a bar chart displaying opinions for and against different topics. I tried to do this with pgfplots starting from bar and interval bar charts. Bars to both sides can be archived ...
14
votes
1answer
720 views

How do I force tikz to use CMYK everywhere (also in shadings)?

I'm doing a poster with the baposter which uses tikz and at some point realized that some colors that should be identical are not. It turns out that tikz apparently resorts to RGB color space as soon ...
5
votes
1answer
990 views

Shading regions of a graph with Tikz?

I'd like to shade the regions labeled A, B, C, D in this graph. \begin{tikzpicture} \begin{axis}[ xmin = 0, xmax = 1000, ymin = 12, ymax = 16, xlabel=$Q$, ylabel=$P$, ] \addplot[name ...
3
votes
1answer
462 views

Scaling graph along x axis

I am trying to plot a symple graph with pgfplots but the numbers do not seem to appear right. Is it possible to somehow scale the left part of the graph? I would also like the numbers on the x axis ...
2
votes
2answers
2k views

Drawing figures in LaTeX

Can I make the figure which I just posted here in LaTeX?
4
votes
2answers
551 views

Simple directed hypergraphs in TikZ

I'm looking for a simple way in Tikz to draw directed hypergraphs, where the hyperedges are ordered pairs of sets of vertices. For example I would like the hyperedges ({a,b},{c}) and ({c},{a,b}) to be ...
3
votes
1answer
300 views

tikzpicture has different arrow tip colors in pdf output and dvi output

i have the following mwe \documentclass[tikz,border=4pt]{standalone} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[->,>=angle 45,scale=3,ultra thick] \draw[help lines] ...
19
votes
1answer
1k views

Range of a piano: keyboard vs staves

This is a kind of follow-up to this question. I'd like to reproduce with tikz the following image. I have no idea of how I could "synchronize" the output of musictex and tikz. Maybe I'd better ...
5
votes
2answers
563 views

Plotting R boxplots with pgfplots

I use quite a number of boxplots in my writing, and have chosen pgfplots as my plotting solution for a number of reasons (one of which is the benefit of having the data to build the plot in the tex ...
10
votes
1answer
402 views

Arrow with superscript in tikz-cd

I need my tikz-cd diagrams to have arrows (vertical and horizontal) that mimic \mapsto^* to match the relation in the text. The closest I've managed is to add a label {*} at [pos=1]: ...
6
votes
2answers
199 views

drawing figure to scale

I have a technical drawing of a mechanical setup which I would like to draw in either TikZ or PSTricks. My experience with these two packages is very limited. A "MWE" of the drawing is shown in the ...
6
votes
1answer
424 views

Shading in TikZ calendar

I’ve produced the calendar below with TikZ but I think the colourings need to be made more salient by shading a box around the coloured dates (as there will be four of these years on a page and the ...
8
votes
1answer
654 views

Using pgfmath declared function in pgfplots/tikz commands

The commented rows of the following code give me errors. It seems that functions declared with \pgfmathdeclarefunction do not work with tikz commands... \documentclass{standalone} ...
7
votes
2answers
801 views

Problems using \addlegendentry in a loop with pgfplots

I have some spectra to plot, which I exported from the Siemens Xray toolbox, which works nicely with pgfplots. Since these are multiple files that look the same I think I can do it with a for loop, ...
19
votes
2answers
383 views

How do I define a new punctuation mark?

Here's is some code for a variant exclamation point despite its various short comings (such as non-scalability) \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{calc} ...
4
votes
1answer
102 views

Drawing anomaly — do macros nest properly?

The following code draws edges with arrows to two squares. It seems to me the effect should be identical, but no. The arrow at the "node[alive]" child just touches the child, while the arrow at the ...
5
votes
2answers
2k views

Labels above the nodes

Consider the simple graph below, \begin{tikzpicture}[node distance=2.5cm,main node/.style={circle,fill=white!20,draw}, scale=0.6, every node/.style={scale=0.6}] \node[main node] [label={[label ...
7
votes
1answer
5k views

TikZ: remove margin, padding, border around nodes containing images

I want to create a simple figure where images are connected with arrows. Here is what I did: \begin{tikzpicture} \node[](A) {\includegraphics[width=0.2\textwidth]{a}}; \node[right=1mm of A](B) ...
5
votes
1answer
123 views

`shorten` and bounding box in tikz; possible bug?

While working out this answer, I found out that shorten options do not count towards computing the bounding box of a tikzpicture. Case in point: \documentclass{standalone} \usepackage[]{tikz} ...
14
votes
5answers
1k views

Drawing a regular polygon encompassed by a circle

I would like to replicate the sort of diagrams shown below - a regular polygon in dashed lines encompassed by a solid lined unit circle with vectors going from the origin to each labelled vertex in an ...
6
votes
1answer
213 views

When using decorations, how can I calculate with \pgfdecoratedpathlength?

I would like to draw a picture with tikz and use 'decorations' to show a single pulse on a line. Correct: A -- B As you may see my code won't work for more than one segment ( A--C--B ). ...
2
votes
0answers
164 views

Tikzpicture: Data from File

I want to create a number of trees from a series of input files. What syntax would the file need to be in to create the following tree? This is what I need done, but from a file and with loops ...
9
votes
1answer
369 views

TikZ: a cylinder of infinite height

I would like to use the Magenta cylinder from dandelin spheres, but I want to have the illusion that the cylinder goes to infinity in the positive z direction. I am ignoring the rest of the code ...
4
votes
1answer
514 views

Pgfplots: How to fill area under a curve in a 3d plot similar to \closedcycle in 2d

How can I fill the area under a curve in a 3d plot, similar to the \closedcycle command in ordinary 2d plots? Applying this command does a filling which is not rotated. Minimal working example: ...
3
votes
1answer
537 views

Inserting floating text near decision tree arrows

How do I insert Yes and No beside the solid arrows? I tried putting node [near end, right] {Yes} after each node and child declaration but this just messes up the flow of the decision tree. Code ...
4
votes
1answer
834 views

pgfplot xbar legend ordering

when I am drawing a xbar chart, I have troubles with the legend entries. They appear to have the opposite ordering as I suppose they should have. \begin{tikzpicture} \begin{axis}[xbar] \addplot ...
2
votes
0answers
106 views

Producing odt from tikzpicture?

How can I produce an odt file from a tex source which includes tikzpicture ? I tried mk4ht oolatex test.tex but I only be able to produce an empty odt file from the following code : ...
7
votes
1answer
528 views

Automatically setting one node after the other in Tikz

I've changed a timeline of mine to look like the one asked in this question: timeline and tikz Everything went smoothly but I have a problem. I don't know how to automatically set the nodes' ...
13
votes
3answers
1k views

Which LaTeX package is needed to draw radar-like diagrams?

Can you please suggest some LaTeX package of drawing charts in the format mentioned below? It should offer the possibility to put text as "Text A" as well as "Text B" . Note: Currently I'm using ...
6
votes
1answer
126 views

Make an \fbox of the remaining line width in `exam` class

I'm writing a math test in the exam class, and I want to make framed boxes for the students to write their answer in. I've tried this solution, but the box exceeds the right page margin by 6.79999pts. ...
8
votes
1answer
3k views

TikZ: configuring arrow tip appearance not working according to documentation

I'm trying to follow the details outlined in the manual for configuring the appearance of arrow tips. But, I get nothing but errors. I'm trying to get the examples from section 16.3 on Arrow keys to ...
4
votes
1answer
261 views

Tikz: text containing formulas and symbols following a given curve

I have already been searching for this some time, but unfortunately I cannot find an answer. I am trying to write some text that is following a given curve. As long as I do not use math mode that ...
1
vote
1answer
409 views

tikzmark and issue with pgfsys-dvips.def

When I try to use \tikzmark (actually, any feature that relies on the [remember picture] functionality of TikZ) in the WYSIWYG editor BaKoMa TeX, I get the following warning: Package pgf Warning: ...
10
votes
1answer
4k views

Tikz animated figure in Beamer

If possible, can someone help me to animated this figure with Tikz in Beamer? I updated starting by 1 : ( Yamada-watanab ) 2: (Existence faible) 3: (unicite trajectorielle) 4: Tow edges frome ...
3
votes
1answer
387 views

How to draw a conical spiral / redraw diagram?

I'm trying to redraw the diagram diagram below. I'm using it as an exemplar/reference in a document I am writing but I need it to be clearer hence the redraw. I tried and failed to draw it in ...
2
votes
1answer
105 views

Iconography to summarize a table

I am building up a table summarizing several methodologies for a presentation. And I would like to place some coloring iconography to grasp some information at a glance. Here is the problem ...
3
votes
1answer
1k views

problem with Tikz and Beamer

when i put this code on beamer i got bad figure \documentclass[leqno,mathserif]{beamer} \usepackage{graphics,bm} \usetheme{Luebeck} \setbeamercovered{transparent} \usepackage[utf8]{inputenc} ...