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)

4
votes
1answer
952 views

Alignment of node “groups” in TikZ using `\matrix` or other constructs?

I'm trying to align 2 groups of TikZ nodes but cannot figure out how to do this. I tried wrapping each group with \tikz{...} but that didn't work (probably because of \tikz inside tikzpicture ...
7
votes
1answer
517 views

tikz intersection fails in combination with the library calc

In the second example I am trying to work the the library intersection. It works fine as long as I don't use the calc library. The first example shows my intention. I am using ($2*(w1')$) which ...
4
votes
4answers
1k views

tabular side-by-side

I am trying to get two tabular constructs side-by-side with a tikz figure in between and can't seem to get what I want using the minipage construct. Here is the code I have ...
46
votes
2answers
2k views

Recreating a guilloche with TikZ

One of my last questions talked about certificates and I got great answers. Now my questions is, can one recreate a guilloche in TikZ like the one shown below: or may be a border like
16
votes
3answers
2k views

\newcommand: How to determine if in math mode (and then include $ $)?

I would like to define a new command which should determine (within a tikz plot) whether its argument is in math mode or not. If so, it should wrap the argument with $ $. I found \ifmode to do this, ...
4
votes
1answer
2k views

TikZ-tree: edge-alignment in horizontal org-chart

I'm working on some sort of org-chart/hierarchy-tree and ran into issues with the edge-alignment. As a guideline I used the family-tree-TeXample. See the TeX.sx-dicussion here. However, the text in ...
24
votes
1answer
13k views

Can we define maximum width for a node?

My question is almost opposite to: this question. I have defined a block: \begin{tikzpicture}[node distance = 2cm, auto,->=stealth,point/.style= {circle,fill=red,minimum ...
2
votes
3answers
724 views

Reduce the height of a rectangle

I am drawing a rectangle which is split into 2 parts: \documentclass[runningheads,orivec]{llncs} \usepackage{tikz} \usetikzlibrary{positioning,shapes,shadows,arrows} \begin{document} ...
12
votes
3answers
3k views

How to “highlight” text/formulas with tikz?

I try to construct a yellow rectangle (with tikz) so that I can use it to "highlight" a piece of text. Below you see a minimal example. It already looks good, but how can I avoid the word "dummy" to ...
15
votes
3answers
3k views

Filling a full beamer slide with tikzDevice output from R

Q: What's the best way to fill an entire beamer slide with tikzDevice output (i.e., the .tex file output from the tikz() function in R's tikzDevice package)? I've included some undesirable examples ...
3
votes
1answer
658 views

Is todonotes compatible with twocolumn?

I'd really like to have my tikz \todo notes in my twocolumn document. When writing on the right column it's fine, but the left column drives it crazy. I tried to fiddle with the textwidth option but ...
37
votes
2answers
5k views

Axis break in pgfplots

Is there an easy way to 'break' the axis in a pgfplots environment? What I'm talking about is something like this Any minimal plot will do as an example...for example \documentclass{minimal} ...
8
votes
2answers
356 views

Writing specific versions of an operator for display and inline modes

I'm busy answering a question by constructing a new math operator that uses the sum symbol and some TikZ placed on top. My answer as it stands can be found here. It looks (I think) pretty good in ...
7
votes
3answers
1k views

Splitting a beamer animation

I have a complex animation that evolves over a series of slides (a \foreach \frm in {1,...,12}\only<\frm>{ loop where certain parts are selected on individual slides with \visible). So far I ...
2
votes
0answers
371 views

node not appearing when used with pos option in a pgfplot [closed]

I want to place a node on a plot using the pathway modifier: node[pos=0.5] {node text};. The pgfplots manual clearly describes how that is done, but my node doesn't appear. Could my scaling be a ...
5
votes
1answer
3k views

How to put the values of each bar in a pgfplots bar chart inside the bar itself?

I have this: \begin{tikzpicture} \begin{axis}[ ybar = 0.6, width=1.2\textwidth, height=0.4\textheight, enlarge x limits = 0.2, bar width=16pt, title={Instance els19 with 1\% max error}, legend ...
4
votes
1answer
2k views

Iterate with `\foreach` over multiple variables and '\remember' one of them does not work as expected

I'm not so new to TikZ but am now trying something a little more advanced and am puzzled by the following problem. From researching solutions, I see that lots of good answers with good explanations ...
10
votes
4answers
5k views

Rotating and flipping in TikZ

It is known that if I want to shift a draw command by a constant vector, I can do that. My question is, is it possible to flip a draw command (along a given direction), or to rotate it around the ...
3
votes
2answers
522 views

Beamer + PGF produces “invalid” PDF / crashes acroread

I've got a complex presentation in pdflatex/beamer using lots of TikZ graphics and included images. It works perfectly under linux/evince but not in acroread: some of the graphics do not display and ...
4
votes
2answers
284 views

How to check if a macro expands to something greater than a constant?

Suppose I have a loop: \begin{tikzpicture} \foreach \frm \in {1,...,6}{ \only<\frm>{ % if \frm > 4: set \x to 1, 0 otherwise \node (foo) at (10+5*\x,7) {hello}; }} ...
20
votes
1answer
4k views

How do I rotate a tikz rectangle about a specific axis?

I am trying to create a beamer animation using tikz, but I can't even get basic rotating of a tikz image working as desired. I have a rectangle specified by \draw[rounded corners,dotted] (-3.5,0) ...
10
votes
2answers
2k views

Error Filling Between Curves in Tikz

I'm trying to shade the region bounded by y=x^2, y=exp(-x), and the y-axis (in the first quadrant). This is the code I have so far: \documentclass{article} \usepackage{tikz} \begin{document} ...
4
votes
1answer
228 views

2 minipages side by side don't respect the width of an article

In one of my .tex file, I have the following code which puts 2 minipages side by side, the whole width cover two minipages: \documentclass[11pt, a4paper]{article} \setlength{\topmargin}{-.5in} ...
8
votes
3answers
2k views

automatic conversion of xfig to tikz

I have a large collection (hundreds) of partially quite old xfig pictures. Though I really like the xfig program I would like to move to some more up-to-date picture format like TikZ. So I would like ...
12
votes
2answers
368 views

How to emulate some options of \node from TikZ

Code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \a in {0,45,...,315}% {\node[line width = 0pt, rotate = \a, anchor = ...
18
votes
3answers
19k views

TikZ node placement and arrow drawing

I just started using TikZ and try to get a process control drawn by TikZ. It looks wonderful, but I am a real beginner. I use the simple flow chart as base and came to this result: I use shapes ...
0
votes
1answer
1k views

\usepackage{gnuplot-lua-tikz} --> no output at all

I have a simple test document, that stops working if \usepackage{gnuplot-lua-tikz} is included in the preamble. I use TeXnicCenter in conjunction with pdflatex. I wanted to generate a tikz file ...
11
votes
1answer
900 views

How can I use overlays in beamer when producing graphs with dot?

I usually describe graphs with graphiz and I enjoy dot2tex which produces the corresponding TikZ code. To explain an algorithm in a presentation, I need to uncover the nodes and edges of a graph step ...
12
votes
2answers
5k views

TikZ: conditional nodes inside \foreach

I want to use a \foreach construct to generate several pairs of nodes, except for one of them I want to do something different. This is what I tried: \begin{tikzpicture}[dot/.style={fill,circle,inner ...
2
votes
1answer
823 views

Adding a transition only for an image

Suppose I have a slide defined as follows: \begin{frame}[t,fragile]{Some Slide} \begin{itemize} \item An item \item Another item \end{itemize} \pause \begin{center} \begin{tikzpicture}[overlay] ...
52
votes
5answers
27k views

Rotate node text and use relative positioning in TikZ?

In TikZ, I sometimes want to rotate the text within a node and then position the node relative to another. However, the approach below doesn't work as expected: \documentclass{standalone} ...
7
votes
1answer
415 views

Twist a single line matrix in TikZ

I have a single line matrix made with TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \node [matrix,fill=white!20,draw=blue] (my matrix) ...
14
votes
2answers
19k views

TikZ grid lines

I have the following code: \draw[step=1.0,black,thin] (0.5,0.5) grid (5.5,4.5); which I would like to have generate grid lines in the Y direction at y = {0.5, 1.5, 2.5, 3.5, 4.5} and grid lines in ...
10
votes
2answers
9k views

tikzpicture: How can I draw a loop right-below?

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4cm, thick,main node/.style={circle,draw,font=\Large\bfseries}] \node[main node] (1) {1}; \node[main ...
5
votes
3answers
609 views

Setting the position of an element using Tikz

Recently I've asked a question about "Inserting an image properly in a table", and I got nice answers. I decided to adopt the accepted one but now I have another problem. I thought it was a minor ...
2
votes
2answers
277 views

Figure using Tikz with level

How to generate f(x)=x curve in Tikz from 0 to 10 with small straight lines at (1,0), (2,0) etc at x axis and (0,1), (0,2) etc at y axis?
14
votes
5answers
8k views

Commutative Diagrams and TikZ

I wish I knew how to draw the this commutative diagram with the TikZ package. I would also like to know how to put subtitles in the diagram.
4
votes
0answers
610 views

Creating a colored bar chart using MetaPost or pgfplots [closed]

Right now I have this: input graph input sarith beginfig(1) draw begingraph(3cm,2cm) gdata("data1.d", v, path p; augment p (v1,0); augment p (v1,v2); augment p (v1 Sadd ...
12
votes
3answers
4k views

defining a region to fill in a tikz shape

I am trying to define a collection of shapes that are useful in drawing Riemann surfaces. For this, I am heavily indebted to Andrew Stacey's tqft package. I am having some trouble defining a shape ...
4
votes
1answer
817 views

Wrong scale in a stacked ybar logarithmic plot with basis 10 using package pgfplots

I want the plot described in the title. So I added options log basis y=10 and ybar stacked to the axis environment. The scale becomes wrong. If I add just one option, the scale is right. Is my ...
2
votes
1answer
684 views

Beamer columns won't align minted code and TikZ diagram

I'm trying to create a two column Beamer slide, with the first column displaying a short minted code listing, and the second column displaying a TikZ diagram. Unfortunately the minted code listing is ...
21
votes
1answer
694 views

Why does babel not work in Tikz?

Adding child nodes to child nodes in TikZ Mindmap has some example code, where German words are not hyphenated correctly. I was trying to fix it by using inputenc (for Umlaute) and ...
0
votes
0answers
84 views

How to write TikZ packages [duplicate]

Possible Duplicate: tutorial for making tikz/pgf library I want to write a TikZ-based package. What TikZ/PGF-specific things should I be aware of? For those who've written such packages, ...
5
votes
1answer
1k views

Adding child nodes to child nodes in TikZ Mindmap

I'm trying to build a mind map in TikZ and am having numerous problems. I have only a very basic grasp of TeX and would like some help. I found a source and replaced text to create my first steps. ...
9
votes
1answer
2k views

Overlay an Entire Slide with a Semitransparent Rectangle in Beamer

Using tikz to overlay an entire slide with a semitransparent rectangle is a nice gimmick in presentations. There is only one drawback: If the theme that has a footer, the footer is not covered by the ...
3
votes
1answer
630 views

Making use of entire page in TikZ

I am using the TikZ package to create stacked timelines. See example below. Whenever I make some small modification to the timelines, I have to spend lots of time adjusting all the coordinates. If ...
18
votes
2answers
6k views

Asymmetric cloud shape in TikZ

I have this little cloud shape that I want to use in my system diagram figures. \usetikzlibrary{shapes} \begin{tikzpicture} \node [cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, inner ...
19
votes
1answer
1k views

TikZ library for Computer Science

Is there a Computer Science library for TikZ? I am looking for a library for drawing standard data structures (array, linked list, stack, queue, pointers, trees, etc) in a consistent way. I would ...
10
votes
2answers
7k views

adding gnuplot capability to latex

I have been working with LaTeX, under TeXMaker (latest version 3.2.2) for several months, and recently added PGF/TikZ capability. On that occasion I feared there would be problems as I really have ...
6
votes
1answer
369 views

Problem with keys to emulate \rput with TikZ

This is a beta version of \rput with TikZ. I don't know if the psticks version accepts polar coordinates but I added this option. My problem is to add the options ref = B, Bl , Br, t, tl , tr, b, bl ...